29 #ifndef __FILESYSTEM_H__
30 #define __FILESYSTEM_H__
55 static const ID_TIME_T FILE_NOT_FOUND_TIMESTAMP = 0xFFFFFFFF;
56 static const int MAX_PURE_PAKS = 128;
152 virtual void Init(
void ) = 0;
154 virtual void Restart(
void ) = 0;
156 virtual void Shutdown(
bool reloading ) = 0;
172 virtual idFileList *
ListFiles(
const char *relativePath,
const char *extension,
bool sort =
false,
bool fullRelativePath =
false,
const char* gamedir =
NULL ) = 0;
177 virtual idFileList *
ListFilesTree(
const char *relativePath,
const char *extension,
bool sort =
false,
const char* gamedir =
NULL ) = 0;
183 virtual const char *
RelativePathToOSPath(
const char *relativePath,
const char *basePath =
"fs_devpath" ) = 0;
185 virtual const char *
BuildOSPath(
const char *base,
const char *
game,
const char *relativePath ) = 0;
189 virtual bool FileIsInPAK(
const char *relativePath ) = 0;
202 virtual fsPureReply_t SetPureServerChecksums(
const int pureChecksums[ MAX_PURE_PAKS ],
int gamePakChecksum,
int missingChecksums[ MAX_PURE_PAKS ],
int *missingGamePakChecksum ) = 0;
208 virtual void SetRestartChecksums(
const int pureChecksums[ MAX_PURE_PAKS ],
int gamePakChecksum ) = 0;
220 virtual int ReadFile(
const char *relativePath,
void **
buffer, ID_TIME_T *timestamp =
NULL ) = 0;
225 virtual int WriteFile(
const char *relativePath,
const void *
buffer,
int size,
const char *basePath =
"fs_savepath" ) = 0;
227 virtual void RemoveFile(
const char *relativePath ) = 0;
229 virtual idFile *
OpenFileRead(
const char *relativePath,
bool allowCopyFiles =
true,
const char* gamedir =
NULL ) = 0;
231 virtual idFile *
OpenFileWrite(
const char *relativePath,
const char *basePath =
"fs_savepath" ) = 0;
233 virtual idFile *
OpenFileAppend(
const char *filename,
bool sync =
false,
const char *basePath =
"fs_basepath" ) = 0;
251 virtual void FindDLL(
const char *basename,
char dllPath[ MAX_OSPATH ],
bool updateChecksum ) = 0;
258 virtual bool HasD3XP(
void ) = 0;
263 virtual void CopyFile(
const char *fromOSPath,
const char *toOSPath ) = 0;
284 virtual bool FilenameCompare(
const char *s1,
const char *s2 )
const = 0;
virtual idFile * OpenFileRead(const char *relativePath, bool allowCopyFiles=true, const char *gamedir=NULL)=0
virtual bool PerformingCopyFiles(void) const =0
virtual idFileList * ListFiles(const char *relativePath, const char *extension, bool sort=false, bool fullRelativePath=false, const char *gamedir=NULL)=0
virtual bool UpdateGamePakChecksums(void)=0
virtual int ReadFile(const char *relativePath, void **buffer, ID_TIME_T *timestamp=NULL)=0
char dlerror[MAX_STRING_CHARS]
int GetNumFiles(void) const
virtual void ClearPureChecksums(void)=0
const idStrList & GetList(void) const
virtual int GetNumMaps()=0
virtual void ResetReadCount(void)=0
virtual void CopyFile(const char *fromOSPath, const char *toOSPath)=0
virtual idFile * OpenExplicitFileRead(const char *OSPath)=0
virtual findFile_t FindFile(const char *path, bool scheduleAddons=false)=0
virtual idFile * OpenFileAppend(const char *filename, bool sync=false, const char *basePath="fs_basepath")=0
virtual int ValidateDownloadPakForChecksum(int checksum, char path[MAX_STRING_CHARS], bool isGamePak)=0
virtual void FindMapScreenshot(const char *path, char *buf, int len)=0
virtual void BackgroundDownload(backgroundDownload_t *bgl)=0
virtual bool FilenameCompare(const char *s1, const char *s2) const =0
virtual void FreeFile(void *buffer)=0
virtual int GetOSMask(void)=0
const char * GetDescription(int index) const
virtual int WriteFile(const char *relativePath, const void *buffer, int size, const char *basePath="fs_savepath")=0
int GetNumMods(void) const
virtual void UpdatePureServerChecksums(void)=0
virtual void RemoveFile(const char *relativePath)=0
virtual void ClearDirCache(void)=0
struct backgroundDownload_s * next
virtual idFile * MakeTemporaryFile(void)=0
virtual void SetRestartChecksums(const int pureChecksums[MAX_PURE_PAKS], int gamePakChecksum)=0
virtual fsPureReply_t SetPureServerChecksums(const int pureChecksums[MAX_PURE_PAKS], int gamePakChecksum, int missingChecksums[MAX_PURE_PAKS], int *missingGamePakChecksum)=0
virtual idFile * OpenFileByMode(const char *relativePath, fsMode_t mode)=0
virtual void AddToReadCount(int c)=0
virtual idFile * OpenFileWrite(const char *relativePath, const char *basePath="fs_savepath")=0
const char * GetFile(int index) const
struct urlDownload_s urlDownload_t
struct fileDownload_s fileDownload_t
virtual void FreeFileList(idFileList *fileList)=0
virtual bool FileIsInPAK(const char *relativePath)=0
virtual const char * BuildOSPath(const char *base, const char *game, const char *relativePath)=0
virtual const char * RelativePathToOSPath(const char *relativePath, const char *basePath="fs_devpath")=0
virtual bool RunningD3XP(void)=0
virtual void Restart(void)=0
virtual void GetPureServerChecksums(int checksums[MAX_PURE_PAKS], int OS, int *gamePakChecksum)=0
virtual int GetReadCount(void)=0
virtual idFile * OpenExplicitFileWrite(const char *OSPath)=0
virtual bool IsInitialized(void) const =0
virtual idFileList * ListFilesTree(const char *relativePath, const char *extension, bool sort=false, const char *gamedir=NULL)=0
struct backgroundDownload_s backgroundDownload_t
const char * GetBasePath(void) const
virtual void Shutdown(bool reloading)=0
idFileSystem * fileSystem
virtual void CreateOSPath(const char *OSPath)=0
virtual void CloseFile(idFile *f)=0
virtual const char * OSPathToRelativePath(const char *OSPath)=0
virtual const idDict * GetMapDecl(int i)=0
virtual void FreeModList(idModList *modList)=0
virtual void FindDLL(const char *basename, char dllPath[MAX_OSPATH], bool updateChecksum)=0
const char * GetMod(int index) const
virtual bool HasD3XP(void)=0
virtual void Init(void)=0
virtual int AddZipFile(const char *path)=0
virtual idModList * ListMods(void)=0