Change filesystem for mounted memory card

Clean some code and comment
This commit is contained in:
Xele02
2012-12-09 16:48:56 +01:00
parent 4fce289c02
commit 63b0b61232
6 changed files with 113 additions and 94 deletions

View File

@@ -27,6 +27,7 @@
DirectoryFileSystem::DirectoryFileSystem(IHandleAllocator *_hAlloc, std::string _basePath) : basePath(_basePath)
{
File::CreateFullPath(basePath);
hAlloc = _hAlloc;
}
@@ -52,12 +53,9 @@ std::string DirectoryFileSystem::GetLocalPath(std::string localpath)
bool DirectoryFileSystem::MkDir(const std::string &dirname)
{
std::string fullName = GetLocalPath(dirname);
#ifdef _WIN32
return CreateDirectory(fullName.c_str(), NULL) == TRUE;
#else
mkdir(fullName.c_str(), 0777);
return true;
#endif
return File::CreateFullPath(fullName);
}
bool DirectoryFileSystem::RmDir(const std::string &dirname)