1 /* 2 * Copyright 2002-2003, Haiku Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _FS_QUERY_H 6 #define _FS_QUERY_H 7 8 9 #include <OS.h> 10 #include <dirent.h> 11 12 13 /* Flags for fs_open_[live_]query() */ 14 15 #define B_LIVE_QUERY 0x00000001 16 // Note, if you specify B_LIVE_QUERY, you have to use fs_open_live_query(); 17 // it will be ignored in fs_open_query(). 18 #define B_QUERY_NON_INDEXED 0x00000002 19 // Only enable this feature for non time-critical things, it might 20 // take a long time to proceed. 21 // Also, not every file system might support this feature. 22 23 24 #ifdef __cplusplus 25 extern "C" { 26 #endif 27 28 extern DIR *fs_open_query(dev_t device, const char *query, uint32 flags); 29 extern DIR *fs_open_live_query(dev_t device, const char *query, 30 uint32 flags, port_id port, int32 token); 31 extern int fs_close_query(DIR *d); 32 extern struct dirent *fs_read_query(DIR *d); 33 34 extern status_t get_path_for_dirent(struct dirent *dent, char *buf, 35 size_t len); 36 37 #ifdef __cplusplus 38 } 39 #endif 40 41 #endif /* _FS_QUERY_H */ 42