Functions | |
virtual std::vector< future < std::pair< std::vector < directory_entry >, bool > > > | boost::afio::dispatcher::enumerate (const std::vector< enumerate_req > &reqs)=0 |
Schedule a batch of asynchronous directory enumerations after preceding operations. | |
future< std::pair< std::vector < directory_entry >, bool > > | boost::afio::async_enumerate (future<> _precondition, size_t _maxitems=2, bool _restart=true, path _glob=path(), metadata_flags _metadata=metadata_flags::None, enumerate_req::filter _filtering=enumerate_req::filter::fastdeleted) |
Asynchronous directory enumeration after a preceding operation. | |
std::pair< std::vector < directory_entry >, bool > | boost::afio::enumerate (future<> _precondition, size_t _maxitems=2, bool _restart=true, path _glob=path(), metadata_flags _metadata=metadata_flags::None, enumerate_req::filter _filtering=enumerate_req::filter::fastdeleted) |
Synchronous directory enumeration after a preceding operation. | |
std::pair< std::vector < directory_entry >, bool > | boost::afio::enumerate (error_code &_ec, future<> _precondition, size_t _maxitems=2, bool _restart=true, path _glob=path(), metadata_flags _metadata=metadata_flags::None, enumerate_req::filter _filtering=enumerate_req::filter::fastdeleted) |
Synchronous directory enumeration after a preceding operation. | |
future< std::pair< std::vector < directory_entry >, bool > > | boost::afio::async_enumerate (future<> _precondition, path _glob, size_t _maxitems=2, bool _restart=true, metadata_flags _metadata=metadata_flags::None, enumerate_req::filter _filtering=enumerate_req::filter::fastdeleted) |
Asynchronous directory enumeration after a preceding operation. | |
std::pair< std::vector < directory_entry >, bool > | boost::afio::enumerate (future<> _precondition, path _glob, size_t _maxitems=2, bool _restart=true, metadata_flags _metadata=metadata_flags::None, enumerate_req::filter _filtering=enumerate_req::filter::fastdeleted) |
Synchronous directory enumeration after a preceding operation. | |
std::pair< std::vector < directory_entry >, bool > | boost::afio::enumerate (error_code &_ec, future<> _precondition, path _glob, size_t _maxitems=2, bool _restart=true, metadata_flags _metadata=metadata_flags::None, enumerate_req::filter _filtering=enumerate_req::filter::fastdeleted) |
Synchronous directory enumeration after a preceding operation. | |
future< std::pair< std::vector < directory_entry >, bool > > | boost::afio::async_enumerate (future<> _precondition, metadata_flags _metadata, size_t _maxitems=2, bool _restart=true, path _glob=path(), enumerate_req::filter _filtering=enumerate_req::filter::fastdeleted) |
Asynchronous directory enumeration after a preceding operation. | |
std::pair< std::vector < directory_entry >, bool > | boost::afio::enumerate (future<> _precondition, metadata_flags _metadata, size_t _maxitems=2, bool _restart=true, path _glob=path(), enumerate_req::filter _filtering=enumerate_req::filter::fastdeleted) |
Synchronous directory enumeration after a preceding operation. | |
std::pair< std::vector < directory_entry >, bool > | boost::afio::enumerate (error_code &_ec, future<> _precondition, metadata_flags _metadata, size_t _maxitems=2, bool _restart=true, path _glob=path(), enumerate_req::filter _filtering=enumerate_req::filter::fastdeleted) |
Synchronous directory enumeration after a preceding operation. |
future< std::pair< std::vector< directory_entry >, bool > > boost::afio::dispatcher::enumerate | ( | const std::vector< enumerate_req > & | reqs | ) | [pure virtual] |
Schedule a batch of asynchronous directory enumerations after preceding operations.
By default dir() returns shared handles i.e. dir( foo) and dir( foo) will return the exact same handle, and therefore enumerating not all of the entries at once is a race condition. The solution is to either set maxitems to a value large enough to guarantee a directory will be enumerated in a single shot, or to open a separate directory handle using the file_flags::unique_directory_handle flag.
Note that setting maxitems=1 will often cause a buffer space exhaustion, causing a second syscall with an enlarged buffer. This is because AFIO cannot know if the allocated buffer can hold all of the filename being retrieved, so it may have to retry. Put another way, setting maxitems=1 will give you the worst performance possible, whereas maxitems=2 will probably only return one item most of the time.
Related types: `__afio_enumerate_req__`, `__afio_directory_entry__`, `__afio_stat_t__`
reqs | A batch of enumeration requests. |
future<std::pair<std::vector<directory_entry>, bool> > boost::afio::async_enumerate | ( | future<> | _precondition, |
size_t | _maxitems = 2 , |
||
bool | _restart = true , |
||
path | _glob = path() , |
||
metadata_flags | _metadata = metadata_flags::None , |
||
enumerate_req::filter | _filtering = enumerate_req::filter::fastdeleted |
||
) |
Asynchronous directory enumeration after a preceding operation.
_precondition | The precondition to use. |
_maxitems | The maximum number of items to return in this request. Note that setting to one will often invoke two syscalls. |
_restart | Restarts the enumeration for this open directory handle. |
_glob | An optional shell glob by which to filter the items returned. Done kernel side on Windows, user side on POSIX. |
_metadata | The metadata to prefetch for each item enumerated. AFIO may fetch more metadata than requested if it is cost free. |
_filtering | Any filtering you want AFIO to do for you. |
{distinguish, maxitems first} { [raceguarantee FreeBSD, Linux, OS X..Race free per batch of up to ['maxitems] for ino and type only. Remember that many filing systems will recycle inodes such that a created file will get the inode of a just deleted file, so comparing inodes for equivalence to a direntry() won't help you.] [raceguarantee Windows..Race free per batch of up to ['maxitems] for ino, type, atim, mtim, ctim, size, allocated, birthtim, sparse, compressed.] } {Amortised O(1) to dispatch. Amortised O(M) to complete where M is the average number of entries in each directory.} {enumerate_example}
std::pair<std::vector<directory_entry>, bool> boost::afio::enumerate | ( | future<> | _precondition, |
size_t | _maxitems = 2 , |
||
bool | _restart = true , |
||
path | _glob = path() , |
||
metadata_flags | _metadata = metadata_flags::None , |
||
enumerate_req::filter | _filtering = enumerate_req::filter::fastdeleted |
||
) |
Synchronous directory enumeration after a preceding operation.
_precondition | The precondition to use. |
_maxitems | The maximum number of items to return in this request. Note that setting to one will often invoke two syscalls. |
_restart | Restarts the enumeration for this open directory handle. |
_glob | An optional shell glob by which to filter the items returned. Done kernel side on Windows, user side on POSIX. |
_metadata | The metadata to prefetch for each item enumerated. AFIO may fetch more metadata than requested if it is cost free. |
_filtering | Any filtering you want AFIO to do for you. |
{distinguish, max items first throwing} { [raceguarantee FreeBSD, Linux, OS X..Race free per batch of up to ['maxitems] for ino and type only. Remember that many filing systems will recycle inodes such that a created file will get the inode of a just deleted file, so comparing inodes for equivalence to a direntry() won't help you.] [raceguarantee Windows..Race free per batch of up to ['maxitems] for ino, type, atim, mtim, ctim, size, allocated, birthtim, sparse, compressed.] } {Amortised O(1) to dispatch. Amortised O(M) to complete where M is the average number of entries in each directory.} {enumerate_example}
std::pair<std::vector<directory_entry>, bool> boost::afio::enumerate | ( | error_code & | _ec, |
future<> | _precondition, | ||
size_t | _maxitems = 2 , |
||
bool | _restart = true , |
||
path | _glob = path() , |
||
metadata_flags | _metadata = metadata_flags::None , |
||
enumerate_req::filter | _filtering = enumerate_req::filter::fastdeleted |
||
) |
Synchronous directory enumeration after a preceding operation.
_ec | Error code to set. |
_precondition | The precondition to use. |
_maxitems | The maximum number of items to return in this request. Note that setting to one will often invoke two syscalls. |
_restart | Restarts the enumeration for this open directory handle. |
_glob | An optional shell glob by which to filter the items returned. Done kernel side on Windows, user side on POSIX. |
_metadata | The metadata to prefetch for each item enumerated. AFIO may fetch more metadata than requested if it is cost free. |
_filtering | Any filtering you want AFIO to do for you. |
{distinguish, max items first non throwing} { [raceguarantee FreeBSD, Linux, OS X..Race free per batch of up to ['maxitems] for ino and type only. Remember that many filing systems will recycle inodes such that a created file will get the inode of a just deleted file, so comparing inodes for equivalence to a direntry() won't help you.] [raceguarantee Windows..Race free per batch of up to ['maxitems] for ino, type, atim, mtim, ctim, size, allocated, birthtim, sparse, compressed.] } {Amortised O(1) to dispatch. Amortised O(M) to complete where M is the average number of entries in each directory.} {enumerate_example}
future<std::pair<std::vector<directory_entry>, bool> > boost::afio::async_enumerate | ( | future<> | _precondition, |
path | _glob, | ||
size_t | _maxitems = 2 , |
||
bool | _restart = true , |
||
metadata_flags | _metadata = metadata_flags::None , |
||
enumerate_req::filter | _filtering = enumerate_req::filter::fastdeleted |
||
) |
Asynchronous directory enumeration after a preceding operation.
_precondition | The precondition to use. |
_glob | A shell glob by which to filter the items returned. Done kernel side on Windows, user side on POSIX. |
_maxitems | The maximum number of items to return in this request. Note that setting to one will often invoke two syscalls. |
_restart | Restarts the enumeration for this open directory handle. |
_metadata | The metadata to prefetch for each item enumerated. AFIO may fetch more metadata than requested if it is cost free. |
_filtering | Any filtering you want AFIO to do for you. |
{distinguish, glob first} { [raceguarantee FreeBSD, Linux, OS X..Race free per batch of up to ['maxitems] for ino and type only. Remember that many filing systems will recycle inodes such that a created file will get the inode of a just deleted file, so comparing inodes for equivalence to a direntry() won't help you.] [raceguarantee Windows..Race free per batch of up to ['maxitems] for ino, type, atim, mtim, ctim, size, allocated, birthtim, sparse, compressed.] } {Amortised O(1) to dispatch. Amortised O(M) to complete where M is the average number of entries in each directory.} {enumerate_example}
std::pair<std::vector<directory_entry>, bool> boost::afio::enumerate | ( | future<> | _precondition, |
path | _glob, | ||
size_t | _maxitems = 2 , |
||
bool | _restart = true , |
||
metadata_flags | _metadata = metadata_flags::None , |
||
enumerate_req::filter | _filtering = enumerate_req::filter::fastdeleted |
||
) |
Synchronous directory enumeration after a preceding operation.
_precondition | The precondition to use. |
_glob | A shell glob by which to filter the items returned. Done kernel side on Windows, user side on POSIX. |
_maxitems | The maximum number of items to return in this request. Note that setting to one will often invoke two syscalls. |
_restart | Restarts the enumeration for this open directory handle. |
_metadata | The metadata to prefetch for each item enumerated. AFIO may fetch more metadata than requested if it is cost free. |
_filtering | Any filtering you want AFIO to do for you. |
{distinguish, glob first throwing} { [raceguarantee FreeBSD, Linux, OS X..Race free per batch of up to ['maxitems] for ino and type only. Remember that many filing systems will recycle inodes such that a created file will get the inode of a just deleted file, so comparing inodes for equivalence to a direntry() won't help you.] [raceguarantee Windows..Race free per batch of up to ['maxitems] for ino, type, atim, mtim, ctim, size, allocated, birthtim, sparse, compressed.] } {Amortised O(1) to dispatch. Amortised O(M) to complete where M is the average number of entries in each directory.} {enumerate_example}
std::pair<std::vector<directory_entry>, bool> boost::afio::enumerate | ( | error_code & | _ec, |
future<> | _precondition, | ||
path | _glob, | ||
size_t | _maxitems = 2 , |
||
bool | _restart = true , |
||
metadata_flags | _metadata = metadata_flags::None , |
||
enumerate_req::filter | _filtering = enumerate_req::filter::fastdeleted |
||
) |
Synchronous directory enumeration after a preceding operation.
_ec | Error code to set. |
_precondition | The precondition to use. |
_glob | A shell glob by which to filter the items returned. Done kernel side on Windows, user side on POSIX. |
_maxitems | The maximum number of items to return in this request. Note that setting to one will often invoke two syscalls. |
_restart | Restarts the enumeration for this open directory handle. |
_metadata | The metadata to prefetch for each item enumerated. AFIO may fetch more metadata than requested if it is cost free. |
_filtering | Any filtering you want AFIO to do for you. |
{distinguish, glob first non throwing} { [raceguarantee FreeBSD, Linux, OS X..Race free per batch of up to ['maxitems] for ino and type only. Remember that many filing systems will recycle inodes such that a created file will get the inode of a just deleted file, so comparing inodes for equivalence to a direntry() won't help you.] [raceguarantee Windows..Race free per batch of up to ['maxitems] for ino, type, atim, mtim, ctim, size, allocated, birthtim, sparse, compressed.] } {Amortised O(1) to dispatch. Amortised O(M) to complete where M is the average number of entries in each directory.} {enumerate_example}
future<std::pair<std::vector<directory_entry>, bool> > boost::afio::async_enumerate | ( | future<> | _precondition, |
metadata_flags | _metadata, | ||
size_t | _maxitems = 2 , |
||
bool | _restart = true , |
||
path | _glob = path() , |
||
enumerate_req::filter | _filtering = enumerate_req::filter::fastdeleted |
||
) |
Asynchronous directory enumeration after a preceding operation.
_precondition | The precondition to use. |
_metadata | The metadata to prefetch for each item enumerated. AFIO may fetch more metadata than requested if it is cost free. |
_maxitems | The maximum number of items to return in this request. Note that setting to one will often invoke two syscalls. |
_restart | Restarts the enumeration for this open directory handle. |
_glob | An optional shell glob by which to filter the items returned. Done kernel side on Windows, user side on POSIX. |
_filtering | Any filtering you want AFIO to do for you. |
{distinguish, metadata first} { [raceguarantee FreeBSD, Linux, OS X..Race free per batch of up to ['maxitems] for ino and type only. Remember that many filing systems will recycle inodes such that a created file will get the inode of a just deleted file, so comparing inodes for equivalence to a direntry() won't help you.] [raceguarantee Windows..Race free per batch of up to ['maxitems] for ino, type, atim, mtim, ctim, size, allocated, birthtim, sparse, compressed.] } {Amortised O(1) to dispatch. Amortised O(M) to complete where M is the average number of entries in each directory.} {enumerate_example}
std::pair<std::vector<directory_entry>, bool> boost::afio::enumerate | ( | future<> | _precondition, |
metadata_flags | _metadata, | ||
size_t | _maxitems = 2 , |
||
bool | _restart = true , |
||
path | _glob = path() , |
||
enumerate_req::filter | _filtering = enumerate_req::filter::fastdeleted |
||
) |
Synchronous directory enumeration after a preceding operation.
_precondition | The precondition to use. |
_metadata | The metadata to prefetch for each item enumerated. AFIO may fetch more metadata than requested if it is cost free. |
_maxitems | The maximum number of items to return in this request. Note that setting to one will often invoke two syscalls. |
_restart | Restarts the enumeration for this open directory handle. |
_glob | An optional shell glob by which to filter the items returned. Done kernel side on Windows, user side on POSIX. |
_filtering | Any filtering you want AFIO to do for you. |
{distinguish, metadata first throwing} { [raceguarantee FreeBSD, Linux, OS X..Race free per batch of up to ['maxitems] for ino and type only. Remember that many filing systems will recycle inodes such that a created file will get the inode of a just deleted file, so comparing inodes for equivalence to a direntry() won't help you.] [raceguarantee Windows..Race free per batch of up to ['maxitems] for ino, type, atim, mtim, ctim, size, allocated, birthtim, sparse, compressed.] } {Amortised O(1) to dispatch. Amortised O(M) to complete where M is the average number of entries in each directory.} {enumerate_example}
std::pair<std::vector<directory_entry>, bool> boost::afio::enumerate | ( | error_code & | _ec, |
future<> | _precondition, | ||
metadata_flags | _metadata, | ||
size_t | _maxitems = 2 , |
||
bool | _restart = true , |
||
path | _glob = path() , |
||
enumerate_req::filter | _filtering = enumerate_req::filter::fastdeleted |
||
) |
Synchronous directory enumeration after a preceding operation.
_ec | Error code to set. |
_precondition | The precondition to use. |
_metadata | The metadata to prefetch for each item enumerated. AFIO may fetch more metadata than requested if it is cost free. |
_maxitems | The maximum number of items to return in this request. Note that setting to one will often invoke two syscalls. |
_restart | Restarts the enumeration for this open directory handle. |
_glob | An optional shell glob by which to filter the items returned. Done kernel side on Windows, user side on POSIX. |
_filtering | Any filtering you want AFIO to do for you. |
{distinguish, metadata first non throwing} { [raceguarantee FreeBSD, Linux, OS X..Race free per batch of up to ['maxitems] for ino and type only. Remember that many filing systems will recycle inodes such that a created file will get the inode of a just deleted file, so comparing inodes for equivalence to a direntry() won't help you.] [raceguarantee Windows..Race free per batch of up to ['maxitems] for ino, type, atim, mtim, ctim, size, allocated, birthtim, sparse, compressed.] } {Amortised O(1) to dispatch. Amortised O(M) to complete where M is the average number of entries in each directory.} {enumerate_example}
January, 2014 |
Copyright © 2013-2014 Niall Douglas, Cork, Ireland Copyright © 2013 Paul Kirth, California |