QuakeForge  0.7.2.210-815cf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
quakefs.h File Reference
This graph shows which files directly or indirectly include this file:

Data Structures

struct  filelist_s
 Simple list for file searches. More...
 
struct  findfile_s
 
struct  gamedir_s
 Cached information about the current game directory. More...
 

Typedefs

typedef struct filelist_s filelist_t
 Simple list for file searches. More...
 
typedef struct findfile_s findfile_t
 
typedef void gamedir_callback_t (int phase)
 Function type of callback called on gamedir change. More...
 
typedef struct gamedir_s gamedir_t
 Cached information about the current game directory. More...
 
typedef struct vpath_s vpath_t
 

Functions

QFile_QFS_FOpenFile (const char *filename, int zip)
 Open a file for reading. More...
 
QFile_QFS_VOpenFile (const char *filename, int zip, const vpath_t *start, const vpath_t *end)
 
char * QFS_CompressPath (const char *pth)
 Create a canonical path. More...
 
void QFS_DefaultExtension (struct dstring_s *path, const char *extension)
 Set the file extention if not already present. More...
 
char * QFS_FileBase (const char *in)
 Extract the non-extension part of the file name from the path. More...
 
const char * QFS_FileExtension (const char *in)
 Return a pointer to the start of the extention part of the path. More...
 
void QFS_FilelistAdd (filelist_t *filelist, const char *fname, const char *ext)
 Add a single file to the file list. More...
 
void QFS_FilelistFill (filelist_t *list, const char *path, const char *ext, int strip)
 Add files from the gamedir within the specified path. More...
 
void QFS_FilelistFree (filelist_t *list)
 Free a file list. More...
 
filelist_tQFS_FilelistNew (void)
 Create a new file list. More...
 
findfile_tQFS_FindFile (const char *fname, const vpath_t *start, const vpath_t *end)
 Search for a file in the quake file-system. More...
 
QFileQFS_FOpenFile (const char *filename)
 Open a file for reading. More...
 
void QFS_Gamedir (const char *gamedir)
 Change the current game directory. More...
 
void QFS_GamedirCallback (gamedir_callback_t *func)
 Register a callback function for when the gamedir changes. More...
 
void QFS_Init (const char *game)
 Initialize the Quake Filesystem. More...
 
void QFS_LoadCacheFile (QFile *file, struct cache_user_s *cu)
 Load a file into memeory. More...
 
byteQFS_LoadFile (QFile *file, int usehunk)
 Load a file into memory. More...
 
byteQFS_LoadHunkFile (QFile *file)
 Load a file into memeory. More...
 
int QFS_NextFilename (struct dstring_s *filename, const char *prefix, const char *ext)
 Find available filename. More...
 
QFileQFS_Open (const char *path, const char *mode)
 Open a file from within the user directory. More...
 
int QFS_Remove (const char *path)
 Delete a file. More...
 
int QFS_Rename (const char *old_path, const char *new_path)
 Rename a file. More...
 
void QFS_SetExtension (struct dstring_s *path, const char *extension)
 Set the file extention. More...
 
const char * QFS_SkipPath (const char *pathname)
 Return a pointer to the start of the filename part of the path. More...
 
void QFS_StripExtension (const char *in, char *out)
 Remove any extension from the path. More...
 
QFileQFS_VOpenFile (const char *filename, const vpath_t *start, const vpath_t *end)
 
QFileQFS_WOpen (const char *path, int zip)
 Open a file for writing. More...
 
void QFS_WriteFile (const char *filename, const void *data, int len)
 Write a block of data to a file. More...
 

Variables

int qfs_filesize
 The size of the file found via QFS_FOpenFile() or _QFS_FOpenFile(). More...
 
findfile_t qfs_foundfile
 Gives information about the last file opened by the FOpenFile functions. More...
 
gamedir_tqfs_gamedir
 Cached information about the current game directory. More...
 
const char * qfs_userpath
 Base of the QFS user directory tree. More...