|
UFO: Alien Invasion
|
Some generic *nix file related functions. More...
#include <unistd.h>#include <sys/time.h>#include <stdlib.h>#include <sys/stat.h>#include <sys/types.h>#include <pwd.h>#include <dlfcn.h>#include <fcntl.h>#include <locale.h>#include <signal.h>#include <dirent.h>#include "../../common/common.h"#include "../system.h"
Go to the source code of this file.
Macros | |
| #define | MAX_FOUND_FILES 0x1000 |
Functions | |
| char * | Sys_GetHomeDirectory (void) |
| Returns the home environment variable (which hold the path of the user's homedir). | |
| void | Sys_NormPath (char *path) |
| static bool | CompareAttributes (const char *path, const char *name, unsigned musthave, unsigned canthave) |
| char * | Sys_FindFirst (const char *path, unsigned musthave, unsigned canhave) |
| Opens the directory and returns the first file that matches our searchrules. | |
| char * | Sys_FindNext (unsigned musthave, unsigned canhave) |
| Returns the next file of the already opened directory (Sys_FindFirst) that matches our search mask. | |
| void | Sys_FindClose (void) |
| void | Sys_ListFilteredFiles (const char *basedir, const char *subdirs, const char *filter, linkedList_t **list) |
| char * | Sys_Cwd (void) |
| void | Sys_Mkdir (const char *thePath) |
| void | Sys_Mkfifo (const char *ospath, qFILE *f) |
| FILE * | Sys_Fopen (const char *filename, const char *mode) |
| int | Sys_Remove (const char *filename) |
| int | Sys_Rename (const char *oldname, const char *newname) |
| int | Sys_Access (const char *filename, int mode) |
Variables | |
| static char | findbase [MAX_OSPATH] |
| static char | findpath [MAX_OSPATH] |
| static char | findpattern [MAX_OSPATH] |
| static DIR * | fdir |
Some generic *nix file related functions.
Definition in file unix_files.cpp.
| #define MAX_FOUND_FILES 0x1000 |
Definition at line 149 of file unix_files.cpp.
|
static |
Definition at line 59 of file unix_files.cpp.
References Com_Printf(), Com_sprintf(), MAX_OSPATH, name, Q_streq, and SFF_SUBDIR.
Referenced by Sys_FindFirst(), and Sys_FindNext().
Definition at line 255 of file unix_files.cpp.
| char * Sys_Cwd | ( | void | ) |
Definition at line 197 of file unix_files.cpp.
Definition at line 142 of file unix_files.cpp.
| char * Sys_FindFirst | ( | const char * | path, |
| unsigned | musthave, | ||
| unsigned | canhave ) |
Opens the directory and returns the first file that matches our searchrules.
Definition at line 87 of file unix_files.cpp.
| char * Sys_FindNext | ( | unsigned | musthave, |
| unsigned | canhave ) |
Returns the next file of the already opened directory (Sys_FindFirst) that matches our search mask.
Definition at line 125 of file unix_files.cpp.
| FILE * Sys_Fopen | ( | const char * | filename, |
| const char * | mode ) |
Definition at line 240 of file unix_files.cpp.
Referenced by Sys_Mkfifo().
| char * Sys_GetHomeDirectory | ( | void | ) |
Returns the home environment variable (which hold the path of the user's homedir).
Definition at line 45 of file unix_files.cpp.
| void Sys_ListFilteredFiles | ( | const char * | basedir, |
| const char * | subdirs, | ||
| const char * | filter, | ||
| linkedList_t ** | list ) |
Definition at line 151 of file unix_files.cpp.
Referenced by Sys_ListFilteredFiles().
| void Sys_Mkdir | ( | const char * | thePath | ) |
Definition at line 208 of file unix_files.cpp.
Definition at line 217 of file unix_files.cpp.
References Com_Printf(), f, FILE, FS_RemoveFile(), and Sys_Fopen().
| void Sys_NormPath | ( | char * | path | ) |
Definition at line 50 of file unix_files.cpp.
| int Sys_Remove | ( | const char * | filename | ) |
Definition at line 245 of file unix_files.cpp.
| int Sys_Rename | ( | const char * | oldname, |
| const char * | newname ) |
Definition at line 250 of file unix_files.cpp.
|
static |
Definition at line 57 of file unix_files.cpp.
Referenced by Sys_FindClose(), Sys_FindFirst(), and Sys_FindNext().
|
static |
Definition at line 54 of file unix_files.cpp.
Referenced by Sys_FindFirst(), and Sys_FindNext().
|
static |
Definition at line 55 of file unix_files.cpp.
Referenced by Sys_FindFirst(), and Sys_FindNext().
|
static |
Definition at line 56 of file unix_files.cpp.
Referenced by Sys_FindFirst(), and Sys_FindNext().