diff options
| author | Steven Fuller <relnev@icculus.org> | 2001-12-18 05:08:52 +0000 |
|---|---|---|
| committer | Patryk Obara <dreamer.tan@gmail.com> | 2019-08-20 02:22:37 +0200 |
| commit | 080430b3bda2bec05362119447d51b6c37f1cfc1 (patch) | |
| tree | a4d2354ed94acb903f7f79a83e198398cb6eb757 /src/files.h | |
| parent | 95b8b49b7602e4e2d3cd9e38273fa94451bec780 (diff) | |
Redid the most of the file loading/saving. Now uses $HOME/.avp/ and
$AVP_DIR to look for files.
Diffstat (limited to 'src/files.h')
| -rw-r--r-- | src/files.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/files.h b/src/files.h new file mode 100644 index 0000000..5e4aa6a --- /dev/null +++ b/src/files.h @@ -0,0 +1,34 @@ +#ifndef __FILES_H__ +#define __FILES_H__ + +#define FILEMODE_READONLY 0x01 +#define FILEMODE_WRITEONLY 0x02 +#define FILEMODE_READWRITE 0x04 +#define FILEMODE_APPEND 0x08 + +#define FILETYPE_PERM 0x10 +#define FILETYPE_OPTIONAL 0x20 +#define FILETYPE_CONFIG 0x40 + +#define FILEATTR_DIRECTORY 0x0100 +#define FILEATTR_READABLE 0x0200 +#define FILEATTR_WRITABLE 0x0400 + +typedef struct GameDirectoryFile +{ + char *filename; + int attr; + time_t timestamp; +} GameDirectoryFile; + +int SetGameDirectories(const char *local, const char *global); +FILE *OpenGameFile(const char *filename, int mode, int type); +int CloseGameFile(FILE *pfd); +int GetGameFileAttributes(const char *filename, int type); +int DeleteGameFile(const char *filename); +int CreateGameDirectory(const char *dirname); +void *OpenGameDirectory(const char *dirname, const char *pattern, int type); +GameDirectoryFile *ScanGameDirectory(void *dir); +int CloseGameDirectory(void *dir); + +#endif |
