QuakeForge  0.7.2.210-815cf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
quakefs.c File Reference

Macros

#define FBLOCK_SIZE   32
 
#define GAMEDIR_CALLBACK_CHUNK   16
 

Typedefs

typedef struct int_findfile_s int_findfile_t
 
typedef struct qfs_var_s qfs_var_t
 
typedef struct searchpath_s searchpath_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 (dstring_t *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 (dstring_t *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...
 

Macro Definition Documentation

#define FBLOCK_SIZE   32
#define GAMEDIR_CALLBACK_CHUNK   16

Typedef Documentation

typedef struct int_findfile_s int_findfile_t
typedef struct qfs_var_s qfs_var_t
typedef struct searchpath_s searchpath_t