00001 00012 #ifndef OP_FILE_H 00013 #define OP_FILE_H 00014 00015 #ifdef __cplusplus 00016 extern "C" { 00017 #endif 00018 00019 #include <sys/types.h> 00020 00029 int op_file_readable(char const * file); 00030 00037 time_t op_get_mtime(char const * file); 00038 00045 int create_dir(char const * dir); 00046 00047 00058 int create_path(char const * path); 00059 00064 typedef void (*get_pathname_callback)(char const * pathname, void * name_list); 00065 00066 /* This enum is intended solely for the use of get_matching_pathnames(), 00067 * bit 0 is reserved for internal use..*/ 00068 enum recursion_type { 00069 NO_RECURSION = 2, 00070 MATCH_ANY_ENTRY_RECURSION = 4, 00071 MATCH_DIR_ONLY_RECURSION = 8, 00072 }; 00100 int get_matching_pathnames(void * name_list, get_pathname_callback, 00101 char const * base_dir, char const * filter, 00102 enum recursion_type recursion); 00103 00104 00105 #ifdef __cplusplus 00106 } 00107 #endif 00108 00109 #endif /* OP_FILE_H */