2013-04-17 21:09:55 -06:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2008-12-07 22:30:24 -07:00
|
|
|
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "DiscIO/Filesystem.h"
|
|
|
|
#include "DiscIO/FileSystemGCWii.h"
|
2008-12-07 22:30:24 -07:00
|
|
|
|
|
|
|
namespace DiscIO
|
|
|
|
{
|
2009-02-27 18:26:56 -07:00
|
|
|
|
2008-12-07 22:30:24 -07: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 14:14:26 -06:00
|
|
|
return nullptr;
|
2008-12-07 22:30:24 -07:00
|
|
|
|
2010-06-03 14:37:32 -06:00
|
|
|
if (!pFileSystem->IsValid())
|
2008-12-07 22:30:24 -07:00
|
|
|
{
|
|
|
|
delete pFileSystem;
|
2014-03-09 14:14:26 -06:00
|
|
|
pFileSystem = nullptr;
|
2008-12-07 22:30:24 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
return pFileSystem;
|
|
|
|
}
|
2009-02-27 18:26:56 -07:00
|
|
|
|
2008-12-07 22:30:24 -07:00
|
|
|
} // namespace
|