34#define BASEDIRNAME "base"
54typedef struct qFILE_s {
81typedef struct filelink_s {
94typedef struct pack_s {
101typedef struct searchpath_s {
124#define SFF_HIDDEN 0x02
125#define SFF_RDONLY 0x04
126#define SFF_SUBDIR 0x08
127#define SFF_SYSTEM 0x10
152bool FS_RenameFile(const
char* from, const
char* to,
bool relative);
154void FS_CopyFile(const
char* fromOSPath, const
char* toOSPath);
202 inline operator bool ()
const
216 return _file.getFile();
void FS_CloseFile(qFILE *f)
const char * FS_GetFileData(const char *files)
Returns the buffer of a file.
void FS_CreatePath(const char *path)
Creates any directories needed to store the given filename.
int FS_Read2(void *buffer, int len, qFILE *f, bool failOnEmptyRead)
Read a file into a given buffer in memory.
const char * FS_NextPath(const char *prevpath)
Allows enumerating all of the directories in the search path.
void FS_InitFilesystem(bool writeToHomeDir)
void FS_RemoveFile(const char *osPath)
int FS_CheckFile(const char *fmt,...)
Just returns the filelength and -1 if the file wasn't found.
int FS_LoadFile(const char *path, byte **buffer)
Filenames are relative to the quake search path.
void FS_CopyFile(const char *fromOSPath, const char *toOSPath)
Copy a fully specified file from one place to another.
char * FS_NextScriptHeader(const char *files, const char **name, const char **text)
void FS_FreeFile(void *buffer)
int FS_GetModList(linkedList_t **mods)
Searches and builds a list of mod directories.
const char * FS_NextFileFromFileList(const char *files)
Returns the next file that is found in the virtual filesystem identified by the given file pattern.
void FS_AddHomeAsGameDirectory(const char *dir, bool write)
void FS_RestartFilesystem(const char *gamedir)
Restart the filesystem (reload all pk3 files).
bool FS_RenameFile(const char *from, const char *to, bool relative)
Renames a file.
char ** FS_ListFiles(const char *findname, int *numfiles, unsigned musthave, unsigned canthave)
Builds a qsorted filelist.
const char * FS_GetCwd(void)
Return current working dir.
int FS_Read(void *buffer, int len, qFILE *f)
void FS_Shutdown(void)
Cleanup function.
void FS_CreateOpenPipeFile(const char *filename, qFILE *f)
int FS_OpenFile(const char *filename, qFILE *file, filemode_t mode)
Finds and opens the file in the search path.
void FS_NormPath(char *path)
Convert operating systems path separators to ufo virtual filesystem separators (/).
void FS_GetMaps(bool reset)
File the fs_maps array with valid maps.
const char * FS_Gamedir(void)
Called to find where to write a file (savegames, etc).
void FS_AddGameDirectory(const char *dir, bool write)
Adds the directory to the head of the search path.
int FS_BuildFileList(const char *fileList)
Build a filelist.
bool FS_FileExists(const char *filename,...)
Checks whether a file exists (not in virtual filesystem).
int FS_Seek(qFILE *f, long offset, int origin)
Sets the file position of the given file.
int FS_Write(const void *buffer, int len, qFILE *f)
Properly handles partial writes.
void FS_ExecAutoexec(void)
int FS_WriteFile(const void *buffer, size_t len, const char *filename)
int FS_FileLength(qFILE *f)
Returns the size of a given file or -1 if no file is opened.
void FS_CloseFile(qFILE *f)
Closes a file handle.
int FS_Printf(qFILE *f, const char *msg,...) __attribute__((format(__printf__
void format(__printf__, 1, 2)))
QGL_EXTERN GLuint GLchar GLuint * len
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Links one file onto another - like a symlink.
char filename[MAX_OSPATH]
struct searchpath_s * next
char filename[MAX_OSPATH]
Cross-platform type definitions.
static char findname[MAX_OSPATH]