More progress:

Abstracted many fs funcs with helper class.
Removed much duplicated code.
Fixed ReadFile assuming FS errors for ValveFS.
Added ValveFS support for ReadFileString, WriteFile, WriteFileString, DeleteFile.
Added missing param in doc for OpenFile.
This commit is contained in:
Nicholas Hastings
2014-08-01 12:38:51 -07:00
parent 5e7e7ce551
commit 573aea20fb
4 changed files with 296 additions and 183 deletions
+12
View File
@@ -178,6 +178,10 @@ public:
{
return filesystem->Read(pOutput, size, file);
}
int Write(void const* pInput, int size, FileHandle_t file)
{
return filesystem->Write(pInput, size, file);
}
void Seek(FileHandle_t file, int pos, int seekType)
{
filesystem->Seek(file, pos, (FileSystemSeek_t) seekType);
@@ -194,6 +198,14 @@ public:
{
filesystem->Flush(file);
}
bool IsOk(FileHandle_t file)
{
return filesystem->IsOk(file);
}
void RemoveFile(const char *pRelativePath, const char *pathID)
{
filesystem->RemoveFile(pRelativePath, pathID);
}
};
static VFileSystem_Logic logic_filesystem;