Boost.AFIO    Boost C++ Libraries
Public Member Functions | Static Public Member Functions | Friends
boost::afio::directory_entry Class Reference

The abstract base class for an entry in a directory with lazily filled metadata. More...

List of all members.

Public Member Functions

 directory_entry ()
 Default constructor.
 directory_entry (path::string_type _leafname, stat_t __stat, metadata_flags _have_metadata)
 Default constructor.
 directory_entry (const directory_entry &)
directory_entryoperator= (const directory_entry &)
 directory_entry (directory_entry &&o) noexcept
directory_entryoperator= (directory_entry &&o) noexcept
bool operator== (const directory_entry &rhs) const noexcept
bool operator!= (const directory_entry &rhs) const noexcept
bool operator< (const directory_entry &rhs) const noexcept
bool operator<= (const directory_entry &rhs) const noexcept
bool operator> (const directory_entry &rhs) const noexcept
bool operator>= (const directory_entry &rhs) const noexcept
path::string_type name () const noexcept
metadata_flags metadata_ready () const noexcept
metadata_flags fetch_metadata (handle_ptr dirh, metadata_flags wanted)
 Fetches the specified metadata, returning that newly available. This is a blocking call if wanted metadata is not yet ready. Note that if the call blocks and the leafname no longer exists or the directory handle is null, an exception is thrown.
stat_t fetch_lstat (handle_ptr dirh, metadata_flags wanted=directory_entry::metadata_fastpath())
 Returns a copy of the internal `stat_t` structure. This is a blocking call if wanted metadata is not yet ready. Note that if the call blocks and the leafname no longer exists or the directory handle is null, an exception is thrown.
fieldtype st_dev (handle_ptr dirh=handle_ptr())
 Returns st_dev.
fieldtype st_ino (handle_ptr dirh=handle_ptr())
 Returns st_ino.
fieldtype st_type (handle_ptr dirh=handle_ptr())
 Returns st_type.
fieldtype st_perms (handle_ptr dirh=handle_ptr())
 Returns st_perms.
fieldtype st_nlink (handle_ptr dirh=handle_ptr())
 Returns st_nlink.
fieldtype st_uid (handle_ptr dirh=handle_ptr())
 Returns st_uid.
fieldtype st_gid (handle_ptr dirh=handle_ptr())
 Returns st_gid.
fieldtype st_rdev (handle_ptr dirh=handle_ptr())
 Returns st_rdev.
fieldtype st_atim (handle_ptr dirh=handle_ptr())
 Returns st_atim.
fieldtype st_mtim (handle_ptr dirh=handle_ptr())
 Returns st_mtim.
fieldtype st_ctim (handle_ptr dirh=handle_ptr())
 Returns st_ctim.
fieldtype st_size (handle_ptr dirh=handle_ptr())
 Returns st_size.
fieldtype st_allocated (handle_ptr dirh=handle_ptr())
 Returns st_allocated.
fieldtype st_blocks (handle_ptr dirh=handle_ptr())
 Returns st_blocks.
fieldtype st_blksize (handle_ptr dirh=handle_ptr())
 Returns st_blksize.
fieldtype st_flags (handle_ptr dirh=handle_ptr())
 Returns st_flags.
fieldtype st_gen (handle_ptr dirh=handle_ptr())
 Returns st_gen.
fieldtype st_birthtim (handle_ptr dirh=handle_ptr())
 Returns st_birthtim.

Static Public Member Functions

static metadata_flags metadata_supported () noexcept
 A bitfield of what metadata is available on this platform. This doesn't mean all is available for every filing system.
static metadata_flags metadata_fastpath () noexcept
 A bitfield of what metadata is fast on this platform. This doesn't mean all is available for every filing system.
static size_t compatibility_maximum () noexcept
 The maximum number of entries which is "usual" to fetch at once i.e. what your libc does.

Friends

class detail::async_file_io_dispatcher_compat
class detail::async_file_io_dispatcher_windows
class detail::async_file_io_dispatcher_linux
class detail::async_file_io_dispatcher_qnx

Detailed Description

The abstract base class for an entry in a directory with lazily filled metadata.

Note that `directory_entry_hash` will hash one of these for you, and a `std::hash<directory_entry>` specialisation is defined for you so you ought to be able to use directory_entry directly in an `unordered_map<>`.

See `__afio_stat_t__` for explanations of the fields.

Definition at line 986 of file afio.hpp.


Constructor & Destructor Documentation

Default constructor.

Definition at line 999 of file afio.hpp.

boost::afio::directory_entry::directory_entry ( path::string_type  _leafname,
stat_t  __stat,
metadata_flags  _have_metadata 
)

Default constructor.

Definition at line 1001 of file afio.hpp.


Member Function Documentation

path::string_type boost::afio::directory_entry::name ( ) const
Returns:
The name of the directory entry. May be empty if the file is deleted.

Definition at line 1020 of file afio.hpp.

Returns:
A bitfield of what metadata is ready right now

Definition at line 1022 of file afio.hpp.

Fetches the specified metadata, returning that newly available. This is a blocking call if wanted metadata is not yet ready. Note that if the call blocks and the leafname no longer exists or the directory handle is null, an exception is thrown.

Returns:
The metadata now available in this directory entry.
Parameters:
dirhAn open handle to the entry's containing directory. You can get this from an op ref using dirop.get_handle().
wantedA bitfield of the metadata to fetch. This does not replace existing metadata.

Definition at line 1029 of file afio.hpp.

Returns a copy of the internal `stat_t` structure. This is a blocking call if wanted metadata is not yet ready. Note that if the call blocks and the leafname no longer exists or the directory handle is null, an exception is thrown.

Returns:
A copy of the internal `stat_t` structure.
Parameters:
dirhAn open handle to the entry's containing directory. You can get this from an op ref using dirop.get_handle().
wantedA bitfield of the metadata to fetch. This does not replace existing metadata.

Definition at line 1043 of file afio.hpp.

fieldtype boost::afio::directory_entry::st_dev ( handle_ptr  dirh = handle_ptr())

Returns st_dev.

Parameters:
dirhAn optional open handle to the entry's containing directory if fetching missing metadata is desired (an exception is thrown otherwise). You can get this from an op ref using dirop.get_handle().

Definition at line 1058 of file afio.hpp.

fieldtype boost::afio::directory_entry::st_ino ( handle_ptr  dirh = handle_ptr())

Returns st_ino.

Parameters:
dirhAn optional open handle to the entry's containing directory if fetching missing metadata is desired (an exception is thrown otherwise). You can get this from an op ref using dirop.get_handle().

Definition at line 1061 of file afio.hpp.

fieldtype boost::afio::directory_entry::st_type ( handle_ptr  dirh = handle_ptr())

Returns st_type.

Parameters:
dirhAn optional open handle to the entry's containing directory if fetching missing metadata is desired (an exception is thrown otherwise). You can get this from an op ref using dirop.get_handle().

Definition at line 1063 of file afio.hpp.

fieldtype boost::afio::directory_entry::st_perms ( handle_ptr  dirh = handle_ptr())

Returns st_perms.

Parameters:
dirhAn optional open handle to the entry's containing directory if fetching missing metadata is desired (an exception is thrown otherwise). You can get this from an op ref using dirop.get_handle().

Definition at line 1066 of file afio.hpp.

fieldtype boost::afio::directory_entry::st_nlink ( handle_ptr  dirh = handle_ptr())

Returns st_nlink.

Parameters:
dirhAn optional open handle to the entry's containing directory if fetching missing metadata is desired (an exception is thrown otherwise). You can get this from an op ref using dirop.get_handle().

Definition at line 1069 of file afio.hpp.

fieldtype boost::afio::directory_entry::st_uid ( handle_ptr  dirh = handle_ptr())

Returns st_uid.

Parameters:
dirhAn optional open handle to the entry's containing directory if fetching missing metadata is desired (an exception is thrown otherwise). You can get this from an op ref using dirop.get_handle().

Definition at line 1072 of file afio.hpp.

fieldtype boost::afio::directory_entry::st_gid ( handle_ptr  dirh = handle_ptr())

Returns st_gid.

Parameters:
dirhAn optional open handle to the entry's containing directory if fetching missing metadata is desired (an exception is thrown otherwise). You can get this from an op ref using dirop.get_handle().

Definition at line 1074 of file afio.hpp.

fieldtype boost::afio::directory_entry::st_rdev ( handle_ptr  dirh = handle_ptr())

Returns st_rdev.

Parameters:
dirhAn optional open handle to the entry's containing directory if fetching missing metadata is desired (an exception is thrown otherwise). You can get this from an op ref using dirop.get_handle().

Definition at line 1076 of file afio.hpp.

fieldtype boost::afio::directory_entry::st_atim ( handle_ptr  dirh = handle_ptr())

Returns st_atim.

Parameters:
dirhAn optional open handle to the entry's containing directory if fetching missing metadata is desired (an exception is thrown otherwise). You can get this from an op ref using dirop.get_handle().

Definition at line 1079 of file afio.hpp.

fieldtype boost::afio::directory_entry::st_mtim ( handle_ptr  dirh = handle_ptr())

Returns st_mtim.

Parameters:
dirhAn optional open handle to the entry's containing directory if fetching missing metadata is desired (an exception is thrown otherwise). You can get this from an op ref using dirop.get_handle().

Definition at line 1081 of file afio.hpp.

fieldtype boost::afio::directory_entry::st_ctim ( handle_ptr  dirh = handle_ptr())

Returns st_ctim.

Parameters:
dirhAn optional open handle to the entry's containing directory if fetching missing metadata is desired (an exception is thrown otherwise). You can get this from an op ref using dirop.get_handle().

Definition at line 1083 of file afio.hpp.

fieldtype boost::afio::directory_entry::st_size ( handle_ptr  dirh = handle_ptr())

Returns st_size.

Parameters:
dirhAn optional open handle to the entry's containing directory if fetching missing metadata is desired (an exception is thrown otherwise). You can get this from an op ref using dirop.get_handle().

Definition at line 1085 of file afio.hpp.

fieldtype boost::afio::directory_entry::st_allocated ( handle_ptr  dirh = handle_ptr())

Returns st_allocated.

Parameters:
dirhAn optional open handle to the entry's containing directory if fetching missing metadata is desired (an exception is thrown otherwise). You can get this from an op ref using dirop.get_handle().

Definition at line 1087 of file afio.hpp.

fieldtype boost::afio::directory_entry::st_blocks ( handle_ptr  dirh = handle_ptr())

Returns st_blocks.

Parameters:
dirhAn optional open handle to the entry's containing directory if fetching missing metadata is desired (an exception is thrown otherwise). You can get this from an op ref using dirop.get_handle().

Definition at line 1089 of file afio.hpp.

fieldtype boost::afio::directory_entry::st_blksize ( handle_ptr  dirh = handle_ptr())

Returns st_blksize.

Parameters:
dirhAn optional open handle to the entry's containing directory if fetching missing metadata is desired (an exception is thrown otherwise). You can get this from an op ref using dirop.get_handle().

Definition at line 1091 of file afio.hpp.

fieldtype boost::afio::directory_entry::st_flags ( handle_ptr  dirh = handle_ptr())

Returns st_flags.

Parameters:
dirhAn optional open handle to the entry's containing directory if fetching missing metadata is desired (an exception is thrown otherwise). You can get this from an op ref using dirop.get_handle().

Definition at line 1093 of file afio.hpp.

fieldtype boost::afio::directory_entry::st_gen ( handle_ptr  dirh = handle_ptr())

Returns st_gen.

Parameters:
dirhAn optional open handle to the entry's containing directory if fetching missing metadata is desired (an exception is thrown otherwise). You can get this from an op ref using dirop.get_handle().

Definition at line 1095 of file afio.hpp.

fieldtype boost::afio::directory_entry::st_birthtim ( handle_ptr  dirh = handle_ptr())

Returns st_birthtim.

Parameters:
dirhAn optional open handle to the entry's containing directory if fetching missing metadata is desired (an exception is thrown otherwise). You can get this from an op ref using dirop.get_handle().

Definition at line 1097 of file afio.hpp.

A bitfield of what metadata is available on this platform. This doesn't mean all is available for every filing system.

A bitfield of what metadata is fast on this platform. This doesn't mean all is available for every filing system.

The maximum number of entries which is "usual" to fetch at once i.e. what your libc does.


January, 2014

Copyright © 2013-2014 Niall Douglas, Cork, Ireland
Copyright © 2013 Paul Kirth, California
Documentation is generated by Doxygen