2009-07-29 04:57:41 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2002-2003, Haiku Inc. All Rights Reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2002-10-23 17:54:44 +04:00
|
|
|
#ifndef _FS_QUERY_H
|
|
|
|
#define _FS_QUERY_H
|
|
|
|
|
2003-01-29 17:43:38 +03:00
|
|
|
|
2002-10-23 17:54:44 +04:00
|
|
|
#include <OS.h>
|
|
|
|
#include <dirent.h>
|
|
|
|
|
|
|
|
|
2003-01-29 17:43:38 +03:00
|
|
|
/* Flags for fs_open_[live_]query() */
|
2002-10-23 17:54:44 +04:00
|
|
|
|
2003-01-29 17:43:38 +03:00
|
|
|
#define B_LIVE_QUERY 0x00000001
|
|
|
|
// Note, if you specify B_LIVE_QUERY, you have to use fs_open_live_query();
|
|
|
|
// it will be ignored in fs_open_query().
|
|
|
|
#define B_QUERY_NON_INDEXED 0x00000002
|
|
|
|
// Only enable this feature for non time-critical things, it might
|
|
|
|
// take a long time to proceed.
|
|
|
|
// Also, not every file system might support this feature.
|
2002-10-23 17:54:44 +04:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2003-01-29 17:43:38 +03:00
|
|
|
extern DIR *fs_open_query(dev_t device, const char *query, uint32 flags);
|
|
|
|
extern DIR *fs_open_live_query(dev_t device, const char *query,
|
|
|
|
uint32 flags, port_id port, int32 token);
|
|
|
|
extern int fs_close_query(DIR *d);
|
|
|
|
extern struct dirent *fs_read_query(DIR *d);
|
2002-10-23 17:54:44 +04:00
|
|
|
|
2003-01-29 17:43:38 +03:00
|
|
|
extern status_t get_path_for_dirent(struct dirent *dent, char *buf,
|
|
|
|
size_t len);
|
2002-10-23 17:54:44 +04:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2003-01-29 17:43:38 +03:00
|
|
|
#endif /* _FS_QUERY_H */
|