From 8b9ceff84b8d942607dc6af766df5b91122b458c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 29 Jan 2003 14:43:38 +0000 Subject: [PATCH] New fs_query.h header. Now defines a new flag B_QUERY_NON_INDEXED - because querying non-indexed attributes is a slow operation, it now has to be enabled on demand only. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2595 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/kernel/fs_query.h | 45 +++++++++++++++++------------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/headers/os/kernel/fs_query.h b/headers/os/kernel/fs_query.h index 5597974cfb..c717fc99ba 100644 --- a/headers/os/kernel/fs_query.h +++ b/headers/os/kernel/fs_query.h @@ -1,44 +1,41 @@ -/******************************************************************************* -/ -/ File: fs_query.h -/ -/ Description: C interface to the BeOS file system query mechanism. -/ -/ Copyright 1993-98, Be Incorporated, All Rights Reserved. -/ -*******************************************************************************/ - +/* File System attribute queries +** +** Distributed under the terms of the OpenBeOS License. +*/ #ifndef _FS_QUERY_H #define _FS_QUERY_H -#include + #include #include -/* flags for fs_open_query() */ +/* Flags for fs_open_[live_]query() */ -#define B_LIVE_QUERY 0x00000001 +#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. #ifdef __cplusplus extern "C" { #endif +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); -_IMPEXP_ROOT DIR *fs_open_query(dev_t device, const char *query, uint32 flags); -_IMPEXP_ROOT DIR *fs_open_live_query(dev_t device, const char *query, - uint32 flags, port_id port, int32 token); -_IMPEXP_ROOT int fs_close_query(DIR *d); -_IMPEXP_ROOT struct dirent *fs_read_query(DIR *d); - -_IMPEXP_ROOT status_t get_path_for_dirent(struct dirent *dent, char *buf, - size_t len); - +extern status_t get_path_for_dirent(struct dirent *dent, char *buf, + size_t len); #ifdef __cplusplus } #endif - -#endif /* _FS_QUERY_H */ +#endif /* _FS_QUERY_H */