Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

enumerate_req

filter

A convenience bundle of precondition, number of items to enumerate, item pattern match and metadata to prefetch.

Description

You should note that shell globs must use a restricted form for portability:

Microsoft Windows NT oddly does not specify what wildcards are permitted, but I think the documentation for the kernel function FsRtlIsNameInExpression() is probably sound: * means zero or more characters, ? means any one character. Do not use <, > or " as these have special MS-DOS compatibility inducing consequences. Do not use ^ as this is the Windows wildcard escape character.

POSIX further extends NT's wildcards with [seq] which is a subset of characters and [!seq] which is not any subset of characters. Here a is the wildcard escape character.

Synopsis
struct enumerate_req
{
  future precondition;      // A precondition for this operation. 
  size_t maxitems;          // The maximum number of items to return in this request. Note that setting to one will often invoke two syscalls. 
  bool restart;             // Restarts the enumeration for this open directory handle. 
  path glob;                // An optional shell glob by which to filter the items returned. Done kernel side on Windows, user side on POSIX. 
  metadata_flags metadata;  // The metadata to prefetch for each item enumerated. AFIO may fetch more metadata than requested if it is cost free. 
  filter filtering;         // Any filtering you want AFIO to do for you. 
};
Constructor(s)

Function

Description

Parameters

enumerate_req()

Default constructor.

enumerate_req(future<> _precondition, size_t _maxitems = 2, bool _restart = true,
               path _glob = path(), metadata_flags _metadata = metadata_flags::None, filter _filtering = filter::fastdeleted)

Constructs an instance.

future<>: _precondition: The precondition for this operation.

size_t: _maxitems: The maximum number of items to return in this request. Note that setting to one will often invoke two syscalls.

bool: _restart: Restarts the enumeration for this open directory handle.

path: _glob: An optional shell glob by which to filter the items returned. Done kernel side on Windows, user side on POSIX.

metadata_flags: _metadata: The metadata to prefetch for each item enumerated. AFIO may fetch more metadata than requested if it is cost free.

filter: _filtering: Any filtering you want AFIO to do for you.

enumerate_req(future<> _precondition, path _glob, size_t _maxitems = 2,
               bool _restart = true, metadata_flags _metadata = metadata_flags::None, filter _filtering = filter::fastdeleted)

Constructs an instance.

future<>: _precondition: The precondition for this operation.

path: _glob: A shell glob by which to filter the items returned. Done kernel side on Windows, user side on POSIX.

size_t: _maxitems: The maximum number of items to return in this request. Note that setting to one will often invoke two syscalls.

bool: _restart: Restarts the enumeration for this open directory handle.

metadata_flags: _metadata: The metadata to prefetch for each item enumerated. AFIO may fetch more metadata than requested if it is cost free.

filter: _filtering: Any filtering you want AFIO to do for you.

enumerate_req(future<> _precondition, metadata_flags _metadata, size_t _maxitems = 2,
               bool _restart = true, path _glob = path(), filter _filtering = filter::fastdeleted)

Constructs an instance.

future<>: _precondition: The precondition for this operation.

metadata_flags: _metadata: The metadata to prefetch for each item enumerated. AFIO may fetch more metadata than requested if it is cost free.

size_t: _maxitems: The maximum number of items to return in this request. Note that setting to one will often invoke two syscalls.

bool: _restart: Restarts the enumeration for this open directory handle.

path: _glob: An optional shell glob by which to filter the items returned. Done kernel side on Windows, user side on POSIX.

filter: _filtering: Any filtering you want AFIO to do for you.

Member Function(s)

Function

Description

Parameters

Returns

bool validate()

Validates contents.

Header

#include <boost/afio/v2/afio.hpp>


PrevUpHomeNext