2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2013-04-18 03:09:55 +00:00
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "DiscIO/Filesystem.h"
|
|
|
|
#include "DiscIO/FileSystemGCWii.h"
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
namespace DiscIO
|
|
|
|
{
|
2009-02-28 01:26:56 +00:00
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
IFileSystem::IFileSystem(const IVolume *_rVolume)
|
|
|
|
: m_rVolume(_rVolume)
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
IFileSystem::~IFileSystem()
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
IFileSystem* CreateFileSystem(const IVolume* _rVolume)
|
|
|
|
{
|
|
|
|
IFileSystem* pFileSystem = new CFileSystemGCWii(_rVolume);
|
|
|
|
|
|
|
|
if (!pFileSystem)
|
2014-03-09 20:14:26 +00:00
|
|
|
return nullptr;
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2010-06-03 20:37:32 +00:00
|
|
|
if (!pFileSystem->IsValid())
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
|
|
|
delete pFileSystem;
|
2014-03-09 20:14:26 +00:00
|
|
|
pFileSystem = nullptr;
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return pFileSystem;
|
|
|
|
}
|
2009-02-28 01:26:56 +00:00
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
} // namespace
|