docs: Move fs_query documentation to the Haiku Book.

Also add a missing include in QueryPoseView.
This commit is contained in:
Augustin Cavalier
2026-02-04 17:41:53 -05:00
parent 379c8aebab
commit 310f75e043
4 changed files with 54 additions and 12 deletions
+1 -1
View File
@@ -334,7 +334,7 @@
\fn status_t BQuery::SetFlags(uint32 flags)
\brief Sets the flags the query will be opened with.
The possible flags to set are defined in \file fs_query.h.
The possible flags to set are defined in \c fs_query.h.
This methods fails if called after Fetch(). To reuse the BQuery object it
must first be reset via Clear().
+47
View File
@@ -0,0 +1,47 @@
/*
* Copyright 2026, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Corresponds to:
* headers/os/storage/fs_query.h hrev47402
*/
/*!
\file fs_query.h
\ingroup storage
*/
/*!
\var B_LIVE_QUERY
\brief Specifies that the query should be "live".
\note If you specify this flag, you have to use fs_open_live_query();
it will be ignored in fs_open_query().
\since BeOS R3
*/
/*!
\var B_QUERY_NON_INDEXED
\brief Specifies that the query should be run even if no indexed attributes are queried.
\note Only enable this feature for non-time-critical things, it might
take a long time to proceed.
\note Some query-enabled filesystems might not support this feature.
\since Haiku R1
*/
/*!
\var B_QUERY_WATCH_ALL
\brief Watch all changes to files in live queries, not just additions or removals.
This is analogous to the \c B_WATCH_ALL node monitor option: instead of only
\c B_ENTRY_ADDED and \c B_ENTRY_REMOVED when files are changed such that they
enter or leave the query, update messages will be sent for all changes to
any files in the query (via \c B_ATTR_CHANGED or \c B_ENTRY_MOVED).
\since Haiku R1
*/
+5 -11
View File
@@ -11,17 +11,11 @@
/* Flags for fs_open_[live_]query() */
#define B_LIVE_QUERY (1 << 0)
// 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 (1 << 1)
// 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.
#define B_QUERY_WATCH_ALL (1 << 2)
// Send node monitor (B_ATTR_CHANGED, B_ENTRY_MOVED, etc.) events for all
// attributes on all entries in the query.
enum {
B_LIVE_QUERY = (1 << 0),
B_QUERY_NON_INDEXED = (1 << 1),
B_QUERY_WATCH_ALL = (1 << 2),
};
#ifdef __cplusplus
+1
View File
@@ -57,6 +57,7 @@ All rights reserved.
#include "Tracker.h"
#include <fs_attr.h>
#include <fs_query.h>
using std::nothrow;