1 #ifndef SYSTEM_DIRECTORY_H
2 #define SYSTEM_DIRECTORY_H
4 #include <exec/lists.h>
17 struct directory
*subdir
;
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
);