author | Ryan C. Gordon <icculus@icculus.org> |
Fri, 06 Jul 2001 08:47:23 +0000 | |
changeset 11 | 677e01f5109e |
parent 9 | 1155788ccbe3 |
child 14 | 7d822f0d5f57 |
permissions | -rw-r--r-- |
9 | 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 |
||
11
677e01f5109e
Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents:
9
diff
changeset
|
15 |
static const FileFunctions __PHYSFS_FileHandle_DIR = |
9 | 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 |
||
11
677e01f5109e
Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents:
9
diff
changeset
|
25 |
|
677e01f5109e
Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents:
9
diff
changeset
|
26 |
static const FileFunctions __PHYSFS_FileHandle_DIRW = |
9 | 27 |
{ |
11
677e01f5109e
Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents:
9
diff
changeset
|
28 |
NULL, /* read() method */ |
677e01f5109e
Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents:
9
diff
changeset
|
29 |
DIR_write, /* write() method */ |
677e01f5109e
Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents:
9
diff
changeset
|
30 |
DIR_eof, /* eof() method */ |
677e01f5109e
Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents:
9
diff
changeset
|
31 |
DIR_tell, /* tell() method */ |
677e01f5109e
Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents:
9
diff
changeset
|
32 |
DIR_seek, /* seek() method */ |
677e01f5109e
Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents:
9
diff
changeset
|
33 |
DIR_close, /* close() method */ |
677e01f5109e
Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents:
9
diff
changeset
|
34 |
}; |
677e01f5109e
Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents:
9
diff
changeset
|
35 |
|
677e01f5109e
Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents:
9
diff
changeset
|
36 |
|
677e01f5109e
Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents:
9
diff
changeset
|
37 |
const DirFunctions __PHYSFS_DirFunctions_DIR = |
677e01f5109e
Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents:
9
diff
changeset
|
38 |
{ |
677e01f5109e
Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents:
9
diff
changeset
|
39 |
DIR_isArchive, /* isArchive() method */ |
677e01f5109e
Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents:
9
diff
changeset
|
40 |
DIR_openArchive, /* openArchive() method */ |
9 | 41 |
DIR_enumerate, /* enumerateFiles() method */ |
42 |
DIR_isDirectory, /* isDirectory() method */ |
|
43 |
DIR_isSymLink, /* isSymLink() method */ |
|
44 |
DIR_isOpenable, /* isOpenable() method */ |
|
45 |
DIR_openRead, /* openRead() method */ |
|
11
677e01f5109e
Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents:
9
diff
changeset
|
46 |
DIR_openWrite, /* openWrite() method */ |
9 | 47 |
DIR_dirClose, /* close() method */ |
48 |
}; |
|
49 |
||
50 |
||
51 |
/* This doesn't get listed, since it's technically not an archive... */ |
|
52 |
#if 0 |
|
53 |
const __PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_DIR = |
|
54 |
{ |
|
55 |
"DIR", |
|
56 |
"non-archive directory I/O" |
|
57 |
}; |
|
58 |
#endif |
|
59 |
||
60 |
/* end of dir.c ... */ |
|
61 |