|
1 /* |
|
2 * Standard directory I/O support routines for PhysicsFS. |
|
3 * |
|
4 * Please see the file LICENSE in the source's root directory. |
|
5 * |
|
6 * This file written by Ryan C. Gordon. |
|
7 */ |
|
8 |
|
9 #include <stdio.h> |
|
10 #include <stdlib.h> |
|
11 |
|
12 #define __PHYSICSFS_INTERNAL__ |
|
13 #include "physfs_internal.h" |
|
14 |
|
15 static const FileFunctions __PHYSFS_FileHandle_DIR = |
|
16 { |
|
17 DIR_read, /* read() method */ |
|
18 NULL, /* write() method */ |
|
19 DIR_eof, /* eof() method */ |
|
20 DIR_tell, /* tell() method */ |
|
21 DIR_seek, /* seek() method */ |
|
22 DIR_close, /* close() method */ |
|
23 }; |
|
24 |
|
25 |
|
26 static const FileFunctions __PHYSFS_FileHandle_DIRW = |
|
27 { |
|
28 NULL, /* read() method */ |
|
29 DIR_write, /* write() method */ |
|
30 DIR_eof, /* eof() method */ |
|
31 DIR_tell, /* tell() method */ |
|
32 DIR_seek, /* seek() method */ |
|
33 DIR_close, /* close() method */ |
|
34 }; |
|
35 |
|
36 |
|
37 const DirFunctions __PHYSFS_DirFunctions_DIR = |
|
38 { |
|
39 DIR_isArchive, /* isArchive() method */ |
|
40 DIR_openArchive, /* openArchive() method */ |
|
41 DIR_enumerate, /* enumerateFiles() method */ |
|
42 DIR_exists, /* exists() method */ |
|
43 DIR_isDirectory, /* isDirectory() method */ |
|
44 DIR_isSymLink, /* isSymLink() method */ |
|
45 DIR_openRead, /* openRead() method */ |
|
46 DIR_openWrite, /* openWrite() method */ |
|
47 DIR_openAppend, /* openAppend() method */ |
|
48 DIR_remove, /* remove() method */ |
|
49 DIR_mkdir, /* mkdir() method */ |
|
50 DIR_close, /* close() method */ |
|
51 }; |
|
52 |
|
53 |
|
54 /* This doesn't get listed, since it's technically not an archive... */ |
|
55 #if 0 |
|
56 const __PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_DIR = |
|
57 { |
|
58 "DIR", |
|
59 "non-archive directory I/O" |
|
60 }; |
|
61 #endif |
|
62 |
|
63 /* end of dir.c ... */ |
|
64 |