1 /* fs_index.h 2 ** 3 ** functions/definitions for file system indices. 4 ** Distributed under the terms of the OpenBeOS License. 5 */ 6 7 #ifndef _FS_INDEX_H 8 #define _FS_INDEX_H 9 10 #include <OS.h> 11 #include <dirent.h> 12 13 14 typedef struct index_info { 15 uint32 type; 16 off_t size; 17 time_t modification_time; 18 time_t creation_time; 19 uid_t uid; 20 gid_t gid; 21 } index_info; 22 23 24 #ifdef __cplusplus 25 extern "C" { 26 #endif 27 28 extern int fs_create_index(dev_t device, const char *name, uint32 type, uint32 flags); 29 extern int fs_remove_index(dev_t device, const char *name); 30 extern int fs_stat_index(dev_t device, const char *name, struct index_info *indexInfo); 31 32 extern DIR *fs_open_index_dir(dev_t device); 33 extern int fs_close_index_dir(DIR *indexDirectory); 34 extern struct dirent *fs_read_index_dir(DIR *indexDirectory); 35 extern void fs_rewind_index_dir(DIR *indexDirectory); 36 37 #ifdef __cplusplus 38 } 39 #endif 40 41 #endif /* _FS_INDEX_H */ 42