1 /*
2 This program is free software; you can redistribute it and/or
3 modify it under the terms of the GNU General Public License
4 as published by the Free Software Foundation; either version 2
5 of the License, or (at your option) any later version.
6 
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 
11 See the GNU General Public License for more details.
12 
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
16 
17 
18 */
19 
20 #ifndef __FS_H__
21 #define __FS_H__
22 
23 /*
24 =============================================================================
25 
26 VARIABLES
27 
28 =============================================================================
29 */
30 
31 extern char fs_gamedir[MAX_OSPATH];
32 
33 /*
34 =============================================================================
35 
36 FUNCTION PROTOTYPES
37 
38 =============================================================================
39 */
40 
41 void FS_Init (void);
42 void FS_ShutDown(void);
43 long FS_FileLength (FILE *f);
44 void FS_FileBase (char *in, char *out);
45 #define COM_FileBase FS_FileBase // ezquake compatibility
46 
47 void FS_WriteFile (char *filename, void *data, int len);
48 
49 byte *FS_LoadTempFile (char *path, int *len);
50 byte *FS_LoadHunkFile (char *path, int *len);
51 void FS_CreatePath (char *path);
52 char *FS_NextPath (char *prevpath);
53 void FS_SetGamedir (char *dir, qbool force);
54 
55 qbool FS_UnsafeFilename(const char* name);
56 
57 #endif /* !__FS_H__ */
58