2 * $Logfile: /Freespace2/code/CFile/CfileSystem.h $
7 * Functions to keep track of and find files that can exist
8 * on the harddrive, cd-rom, or in a pack file on either of those.
9 * This keeps a list of all the files in packfiles or on CD-rom
10 * and when you need a file you call one function which then searches
11 * all those locations, inherently enforcing precedence orders.
14 * Revision 1.1 2002/05/03 03:28:11 root
18 * 3 10/13/98 9:19a Andsager
19 * Add localization support to cfile. Optional parameter with cfopen that
20 * looks for localized files.
22 * 2 10/07/98 10:52a Dave
25 * 1 10/07/98 10:48a Dave
27 * 5 5/01/98 10:21a John
28 * Added code to find all pack files in all trees. Added code to create
29 * any directories that we write to.
31 * 4 4/30/98 10:21p John
32 * Added code to cleanup cfilesystem
37 #ifndef _CFILESYSTEM_H
38 #define _CFILESYSTEM_H
40 // Builds a list of all the files
41 void cf_build_secondary_filelist( char *cdrom_path );
42 void cf_free_secondary_filelist();
45 typedef struct cf_pathtype {
46 int index; // To verify that the CF_TYPE define is correctly indexed into this array
47 char *path; // Path relative to Freespace root, has ending backslash.
48 char *extensions; // Extensions used in this pathtype, separated by spaces
49 int parent_index; // Index of this directory's parent. Used for creating directories when writing.
52 // During cfile_init, verify that Pathtypes[n].index == n for each item
53 extern cf_pathtype Pathtypes[CF_MAX_PATH_TYPES];
55 // Returns the default storage path for files given a
56 // particular pathtype. In other words, the path to
57 // the unpacked, non-cd'd, stored on hard drive path.
58 // If filename isn't null it will also tack the filename
59 // on the end, creating a completely valid filename.
60 // Input: pathtype - CF_TYPE_??
61 // filename - optional, if set, tacks the filename onto end of path.
62 // Output: path - Fully qualified pathname.
63 void cf_create_default_path_string( char *path, int pathtype, char *filename=NULL, bool localize = false);
66 #endif //_CFILESYSTEM_H