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