Fix for BCPL string handling.
[AROS-Contrib.git] / vpdf / system / directory.h
blobdae76e009b33f392e88cf96cd06c84d97540ce7a
1 #ifndef SYSTEM_DIRECTORY_H
2 #define SYSTEM_DIRECTORY_H
4 #include <exec/lists.h>
6 struct directory
8 struct MinList list;
9 char basename[0];
13 struct directorynode
15 struct MinNode n;
16 int dir;
17 struct directory *subdir;
18 char name[0];
21 #define DIRECTORY_SCAN_RECURSIVE 1
22 #define DIRECTORY_SORT 2
24 typedef enum DirectoryTraverseResult
26 DIRECTORY_TRAVERSE_ABORT = -1,
27 DIRECTORY_TRAVERSE_ABORTDIR = -2,
28 DIRECTORY_TRAVERSE_CONTINUE = 1,
29 DIRECTORY_TRAVERSE_OK = 0,
30 DIRECTORY_TRAVERSE_ERROR = -3,
31 } DirectoryTraverseResult;
33 struct directory *directoryScan(const char *path, int flags);
34 DirectoryTraverseResult directoryTraverse(const char *path, int flags, DirectoryTraverseResult (*callback)(struct FileInfoBlock *fib, char *path, int level, void *data), void *data);
35 void directoryFree(struct directory *dir);
37 char *directoryGetNodeName(struct directory *dir, struct directorynode *node);
38 void directoryFreeNodeName(char *name);
39 struct directorynode *directoryFindNode(struct directory *dir, char *name);
40 char *directoryGetParentName(char *dir);
42 int dirCreatePath(char *path);
44 #endif