Boost.AFIO    Boost C++ Libraries
Classes | Namespaces | Defines | Typedefs | Enumerations | Functions | Variables
/home/jenkins-slave/workspace/Boost.AFIO Build Documentation/boost-local/libs/afio/include/boost/afio/v2/afio.hpp File Reference

Provides a batch asynchronous file i/o implementation based on Boost.ASIO. More...

Go to the source code of this file.

Classes

class  boost::afio::detail::enqueued_task_impl< R >
struct  boost::afio::detail::enqueued_task_impl< R >::Private
class  boost::afio::enqueued_task< R()>
class  boost::afio::enqueued_task< void()>
class  boost::afio::thread_source
 Abstract base class for a source of thread workers. More...
class  boost::afio::std_thread_pool
 A very simple thread pool based on std::thread or boost::thread. More...
class  boost::afio::std_thread_pool::worker
class  boost::afio::path
 An AFIO filesystem path, a thin wrapper of filesystem::path used to mark when a filesystem path has been prepared for AFIO usage. Note that on Windows this exclusively refers to a case sensitive NT kernel path, not a Win32 path (Win32 paths are converted in the constructor). More...
struct  boost::afio::path::direct
struct  boost::afio::path::make_absolute
 Makes a path absolute according to the current working directory. More...
struct  boost::afio::path_hash
 A hasher for path. More...
struct  boost::afio::stat_t
 Metadata about a directory entry. More...
struct  boost::afio::statfs_t
 Metadata about a filing system. Unsupported entries are -1. More...
struct  boost::afio::statfs_t::f_flags_t
class  boost::afio::directory_entry
 The abstract base class for an entry in a directory with lazily filled metadata. More...
struct  boost::afio::directory_entry_hash
 A hasher for directory_entry, hashing inode and birth time (if available on this platform). More...
class  boost::afio::handle
 The abstract base class encapsulating a platform-specific file handle. More...
struct  boost::afio::handle::mapped_file
 A holder of a mapped file. More...
class  boost::afio::current_dispatcher_guard
struct  boost::afio::is_future< T >
 Trait for determining if a type is an afio::future<T> More...
struct  boost::afio::is_future< future< T > >
class  boost::afio::future< void >
class  boost::afio::future< T >
 The future status of a scheduled asynchronous operation. More...
struct  boost::afio::detail::do_continuation< future_type, promise_type >
struct  boost::afio::detail::do_continuation< future< R >, void >
struct  boost::afio::detail::vs2013_variadic_overload_resolution_workaround< C, Args >
class  boost::afio::dispatcher
 Abstract base class for dispatching file i/o asynchronously. More...
struct  boost::afio::detail::when_all_state
struct  boost::afio::detail::when_any_state
struct  boost::afio::detail::select_when_ops_return_type< is_all >
struct  boost::afio::detail::select_when_ops_return_type< false >
struct  boost::afio::detail::enable_if_async_op< is_all, T >
struct  boost::afio::detail::enable_if_async_op< is_all, future< T > >
struct  boost::afio::path_req
 A convenience bundle of path and flags, with optional precondition. Paths may be a path fragment (relative to the precondition) or absolute, in which case if necessary they are made canonical and absolute in the constructor according to the current working directory. More...
struct  boost::afio::path_req::relative
 Convenience tag type constructing a relative path path_req. More...
struct  boost::afio::path_req::absolute
 Convenience tag type constructing an absolute path path_req. More...
struct  boost::afio::detail::to_asio_buffers_helper< is_const, R, T, is_trivial, is_container >
struct  boost::afio::detail::to_asio_buffers_helper< is_const, R, T, true, false >
struct  boost::afio::detail::container_to_asio_buffers_helper< R, C, T, is_const, is_trivial >
struct  boost::afio::detail::container_to_asio_buffers_helper< R, std::basic_string< C, T, A >, _Ct, is_const, true >
struct  boost::afio::detail::container_to_asio_buffers_helper< R, std::vector< T, A >, _T, is_const, true >
struct  boost::afio::detail::container_to_asio_buffers_helper< R, std::array< T, N >, _T, is_const, true >
struct  boost::afio::detail::to_asio_buffers_helper< is_const, R, T, is_trivial, true >
struct  boost::afio::detail::to_asio_buffers_helper< is_const, R, std::vector< asio::mutable_buffer >, false, true >
struct  boost::afio::detail::to_asio_buffers_helper< is_const, asio::mutable_buffer, std::vector< asio::mutable_buffer >, false, true >
struct  boost::afio::detail::to_asio_buffers_helper< is_const, R, std::vector< asio::const_buffer >, false, true >
struct  boost::afio::detail::to_asio_buffers_helper< is_const, asio::const_buffer, std::vector< asio::const_buffer >, false, true >
struct  boost::afio::detail::to_asio_buffers_helper< is_const, R, std::array< asio::mutable_buffer, N >, false, true >
struct  boost::afio::detail::to_asio_buffers_helper< is_const, R, std::array< asio::const_buffer, N >, false, true >
class  boost::afio::detail::io_req_impl< false >
class  boost::afio::detail::io_req_impl< true >
struct  boost::afio::io_req< T >
 A convenience bundle of precondition, data and where for reading into a T as specified by its to_asio_buffers() overload. Data MUST stay around until the operation completes. More...
struct  boost::afio::io_req< const T >
 A convenience bundle of precondition, data and where for reading into a T as specified by its to_asio_buffers() overload. Data MUST stay around until the operation completes. More...
struct  boost::afio::io_req< void >
 A convenience bundle of precondition, data and where for reading into a T as specified by its to_asio_buffers() overload. Data MUST stay around until the operation completes. More...
struct  boost::afio::io_req< const void >
 A convenience bundle of precondition, data and where for reading into a T as specified by its to_asio_buffers() overload. Data MUST stay around until the operation completes. More...
struct  boost::afio::detail::make_io_req< T, is_container >
struct  boost::afio::detail::make_io_req< T, true >
struct  boost::afio::enumerate_req
 A convenience bundle of precondition, number of items to enumerate, item pattern match and metadata to prefetch. More...
struct  boost::afio::lock_req
struct  boost::afio::detail::async_file_io_dispatcher_rwconverter< iswrite, T >
struct  boost::afio::detail::async_dir< T >
struct  boost::afio::detail::async_rmdir< T >
struct  boost::afio::detail::async_file< T >
struct  boost::afio::detail::async_rmfile< T >
struct  boost::afio::detail::async_symlink< T >
struct  boost::afio::detail::async_rmsymlink< T >
struct  boost::afio::detail::async_sync
struct  boost::afio::detail::async_close
struct  boost::afio::detail::async_read
struct  boost::afio::detail::async_write
struct  boost::afio::detail::async_truncate
struct  boost::afio::detail::async_enumerate
struct  boost::afio::detail::async_zero
struct  boost::afio::detail::async_extents
struct  boost::afio::detail::async_statfs
struct  boost::afio::detail::_is_not_handle< T >
struct  boost::afio::detail::_is_not_handle< future< T > >
struct  boost::afio::detail::_is_not_handle< handle_ptr >
struct  boost::afio::detail::is_not_handle< T >
class  boost::afio::utils::secded_ecc< blocksize >
 Calculates the single error correcting double error detecting (SECDED) Hamming Error Correcting Code for a blocksize block of bytes. For example, a secdec_ecc<8> would be the very common 72,64 Hamming code used in ECC RAM, or secdec_ecc<4096> would be for a 32784,32768 Hamming code. More...
struct  boost::afio::utils::detail::large_page_allocation
class  boost::afio::utils::page_allocator< T >
 An STL allocator which allocates large TLB page memory.If the operating system is configured to allow it, this type of memory is particularly efficient for doing large scale file i/o. This is because the kernel must normally convert the scatter gather buffers you pass into extended scatter gather buffers as the memory you see as contiguous may not, and probably isn't, actually be contiguous in physical memory. Regions returned by this allocator may be allocated contiguously in physical memory and therefore the kernel can pass through your scatter gather buffers unmodified. More...
struct  boost::afio::utils::page_allocator< T >::rebind< U >
class  boost::afio::utils::page_allocator< void >
struct  boost::afio::utils::page_allocator< void >::rebind< U >
struct  std::hash< boost::afio::path >
struct  std::hash< boost::afio::directory_entry >

Namespaces

namespace  boost::afio::detail
 

The namespace containing Boost.ASIO internal details.


namespace  boost::afio::utils
 

Utility routines often useful when using AFIO.


Defines

#define BOOST_AFIO_HEADERS_ONLY   0
 Determines if AFIO is compiled as headers only. Defaults to 1.
#define BOOST_AFIO_USE_BOOST_THREAD   0
 Determines if AFIO is bound against Boost.Thread or the C++ 11 STL thread. Defaults to 0.
#define BOOST_AFIO_USE_BOOST_FILESYSTEM   1
 Determines if AFIO is bound against Boost.Filesystem or the C++ 1z Filesystem TS. Defaults to 1 unless on VS2015 which provides a full Filesystem TS implementation.
#define ASIO_STANDALONE   0
 Determines if AFIO is bound against standalone ASIO or Boost.ASIO. Defaults to undefined, and therefore Boost.ASIO.
#define BOOST_AFIO_V2_NAMESPACE   boost::afio
#define BOOST_AFIO_V2_NAMESPACE_BEGIN   namespace boost { namespace afio {
#define BOOST_AFIO_V2_NAMESPACE_END   } }
#define BOOST_AFIO_HEADERS_ONLY_MEMFUNC_SPEC
#define BOOST_AFIO_HEADERS_ONLY_VIRTUAL_SPEC   virtual
#define BOOST_AFIO_AFIO_H
#define BOOST_AFIO_VALIDATE_INPUTS   1
 Validate inputs at the point of instantiation.
#define BOOST_AFIO_DECLARE_CLASS_ENUM_AS_BITFIELD(type)
#define BOOST_AFIO_DIRECTORY_ENTRY_ACCESS_METHOD(field)   fieldtype st_##field(handle_ptr dirh=handle_ptr()) { if(!(have_metadata&metadata_flags::field)) { _int_fetch(metadata_flags::field, dirh); } return stat.st_##field; }
#define BOOST_AFIO_SECDEC_INTRINSICS   0
#define BOOST_AFIO_ROUND(n)

Typedefs

typedef unsigned long long boost::afio::off_t

Enumerations

enum  path_normalise { boost::afio::dos, boost::afio::guid_volume, boost::afio::guid_all }
 The types of path normalisation available. More...
enum  boost::afio::file_flags {
  boost::afio::none = 0, boost::afio::read = 1, boost::afio::write = 2, boost::afio::read_write = 3,
  boost::afio::append = 4, boost::afio::truncate = 8, boost::afio::create = 16, boost::afio::create_only_if_not_exist = 32,
  boost::afio::create_compressed = 64, boost::afio::will_be_sequentially_accessed = 128, boost::afio::will_be_randomly_accessed = 256, boost::afio::no_sparse = 512,
  boost::afio::hold_parent_open = (1<<10), boost::afio::unique_directory_handle = (1<<11), boost::afio::no_race_protection = (1<<12), boost::afio::temporary_file = (1<<13),
  boost::afio::delete_on_close = (1<<14), boost::afio::os_direct = (1<<16), os_lockable = (1<<17), boost::afio::always_sync = (1<<24),
  boost::afio::sync_on_close = (1<<25), boost::afio::int_hold_parent_open_nested = (1<<27), boost::afio::int_file_share_delete = (1<<28), boost::afio::int_opening_link = (1<<29),
  boost::afio::int_opening_dir = (1<<30)
}
 Bitwise file and directory open flags. More...
enum  boost::afio::async_op_flags { boost::afio::none = 0, boost::afio::immediate = 1 }
 Bitwise async_op_flags flags. More...
enum  boost::afio::detail::OpType {
  Unknown, UserCompletion, dir, rmdir,
  file, rmfile, symlink, rmsymlink,
  sync, close, read, write,
  truncate, barrier, enumerate, adopt,
  zero, extents, statfs, lock,
  Last
}
 The type of operation. More...
enum  boost::afio::detail::unit_testing_flags { boost::afio::detail::none = 0, boost::afio::detail::no_symbol_lookup = (1<<0) }
enum  boost::afio::metadata_flags {
  None = 0, dev = 1<<0, ino = 1<<1, type = 1<<2,
  perms = 1<<3, nlink = 1<<4, uid = 1<<5, gid = 1<<6,
  rdev = 1<<7, atim = 1<<8, mtim = 1<<9, ctim = 1<<10,
  size = 1<<11, allocated = 1<<12, blocks = 1<<13, blksize = 1<<14,
  flags = 1<<15, gen = 1<<16, birthtim = 1<<17, sparse = 1<<24,
  compressed = 1<<25, reparse_point = 1<<26, boost::afio::All = (size_t)-1
}
 Bitflags for availability of metadata from `struct stat_t`See __afio_stat_t__ for explanation of meaning. More...
enum  boost::afio::fs_metadata_flags {
  None = 0, flags = 1<<15, bsize = 1<<2, iosize = 1<<3,
  blocks = 1<<13, bfree = 1<<5, bavail = 1<<6, files = 1<<7,
  ffree = 1<<8, namemax = 1<<9, owner = 1<<10, fsid = 1<<11,
  fstypename = 1<<12, mntfromname = 1<<13, mntonname = 1<<14, boost::afio::All = (size_t)-1
}
 Bitflags for availability of metadata from `struct statfs_t`. More...

Functions

BOOST_AFIO_DECL
std::shared_ptr
< std_thread_pool > 
boost::afio::process_threadpool ()
 Returns the process threadpool.
bool boost::afio::operator< (const path &lhs, const path &rhs)
bool boost::afio::operator<= (const path &lhs, const path &rhs)
bool boost::afio::operator> (const path &lhs, const path &rhs)
bool boost::afio::operator>= (const path &lhs, const path &rhs)
bool boost::afio::operator== (const path &lhs, const path &rhs)
bool boost::afio::operator!= (const path &lhs, const path &rhs)
path boost::afio::operator/ (const path &lhs, const path &rhs)
std::ostream & boost::afio::operator<< (std::ostream &s, const path &p)
filesystem::path boost::afio::normalise_path (path p, path_normalise type=path_normalise::dos)
 Return a normalised filesystem::path from an AFIO path.
 boost::afio::detail::static_assert (static_cast< size_t >(OpType::Last)==sizeof(optypes)/sizeof(*optypes),"You forgot to fix up the strings matching OpType")
BOOST_AFIO_DECL dispatcher_ptr boost::afio::current_dispatcher (option< dispatcher_ptr > new_dispatcher=empty)
 Retrieves the currently set async_file_io_dispatcher for this thread, optionally setting it to a new dispatcher.
template<class Impl , class Handle >
handle_ptr boost::afio::detail::decode_relative_path (path_req &req, bool force_absolute=false)
BOOST_AFIO_DECL outcome
< dispatcher_ptr > 
boost::afio::make_dispatcher (std::string uri="file : / / /", file_flags flagsforce=file_flags::none, file_flags flagsmask=file_flags::none, std::shared_ptr< thread_source > threadpool=process_threadpool()) noexcept
 Instatiates the best available async_file_io_dispatcher implementation for this system for the given uri.
template<bool rethrow>
void boost::afio::detail::when_all_ops_do (std::shared_ptr< when_all_state > state)
template<bool rethrow, class Iterator >
stl_future< std::vector
< handle_ptr > > 
boost::afio::detail::when_all_ops (Iterator first, Iterator last)
template<bool rethrow>
std::pair< bool, handle_ptr > boost::afio::detail::when_any_ops_do (std::shared_ptr< when_any_state > state, size_t idx, size_t id, future<> h)
template<bool rethrow, class Iterator >
stl_future< handle_ptr > boost::afio::detail::when_any_ops (Iterator first, Iterator last)
template<class Iterator >
detail::enable_if_async_op
< true, typename
Iterator::value_type >::type 
boost::afio::when_all_p (std::nothrow_t _, Iterator first, Iterator last)
 Returns a result when all the supplied ops complete. Does not propagate exception states.
template<class Iterator >
detail::enable_if_async_op
< false, typename
Iterator::value_type >::type 
boost::afio::when_any (std::nothrow_t _, Iterator first, Iterator last)
 Returns a result when any the supplied ops complete. Does not propagate exception states.
template<class T >
stl_future< std::vector
< handle_ptr > > 
boost::afio::when_all_p (std::nothrow_t _, std::vector< future< T >> ops)
 Returns a result when all the supplied ops complete. Does not propagate exception states.
template<class T >
stl_future< handle_ptr > boost::afio::when_any (std::nothrow_t _, std::vector< future< T >> ops)
 Returns a result when any the supplied ops complete. Does not propagate exception states.
template<class Iterator >
detail::enable_if_async_op
< true, typename
Iterator::value_type >::type 
boost::afio::when_all_p (Iterator first, Iterator last)
 Returns a result when all the supplied ops complete. Propagates exception states.
template<class Iterator >
detail::enable_if_async_op
< false, typename
Iterator::value_type >::type 
boost::afio::when_any (Iterator first, Iterator last)
 Returns a result when any the supplied ops complete. Propagates exception states.
template<class T >
stl_future< std::vector
< handle_ptr > > 
boost::afio::when_all_p (std::vector< future< T >> ops)
 Returns a result when all the supplied ops complete. Propagates exception states.
template<class T >
stl_future< handle_ptr > boost::afio::when_any (std::vector< future< T >> ops)
 Returns a result when any the supplied ops complete. Propagates exception states.
template<class T >
stl_future< std::vector
< handle_ptr > > 
boost::afio::when_all_p (std::nothrow_t _, future< T > op)
 Returns a result when the supplied op completes. Does not propagate exception states.
template<class... Types>
stl_future< std::vector
< handle_ptr > > 
boost::afio::when_all_p (future< Types > &...ops)
 Returns a result when the supplied op completes. Propagates exception states.
template<class T >
std::vector< asio::mutable_buffer > boost::afio::to_asio_buffers (T &v)
 Any trivial type T or STL container.
template<class T >
std::vector< asio::const_buffer > boost::afio::to_asio_buffers (const T &v)
 Any trivial type T or STL container.
template<class T , size_t N>
std::vector< asio::mutable_buffer > boost::afio::to_asio_buffers (T(&v)[N])
 A buffer at v sized N*sizeof(T)
template<class T , size_t N>
std::vector< asio::const_buffer > boost::afio::to_asio_buffers (const T(&v)[N])
 A buffer at v sized N*sizeof(T)
std::vector< asio::mutable_buffer > boost::afio::to_asio_buffers (asio::mutable_buffer &v)
 Passing through asio::mutable_buffer.
std::vector< asio::const_buffer > boost::afio::to_asio_buffers (asio::const_buffer &v)
 Passing through asio::const_buffer.
template<class T >
std::vector< asio::mutable_buffer > boost::afio::to_asio_buffers (T *v, size_t length)
 A buffer at v sized length*sizeof(T)
template<class T >
std::vector< asio::const_buffer > boost::afio::to_asio_buffers (const T *v, size_t length)
 A buffer at v sized length*sizeof(T)
std::vector< asio::mutable_buffer > boost::afio::to_asio_buffers (void *v, size_t length)
 A buffer at v sized length.
std::vector< asio::const_buffer > boost::afio::to_asio_buffers (const void *v, size_t length)
 A buffer at v sized length.
template<class T >
auto boost::afio::make_io_req (future<> _precondition, T &&v, off_t _where)-> decltype(detail
 Convenience instantiator of a io_req, letting the compiler deduce the template specialisation to use.
template<class T >
io_req< const
std::initializer_list< T > > 
boost::afio::make_io_req (future<> _precondition, const std::initializer_list< T > &v, off_t _where)
 Convenience instantiator of a io_req, letting the compiler deduce the template specialisation to use.
template<class T >
auto boost::afio::make_io_req (future<> _precondition, T &&v, size_t _length, off_t _where)-> decltype(detail
 Convenience instantiator of a io_req, letting the compiler deduce the template specialisation to use.
template<class tasktype >
std::pair< bool, handle_ptr > boost::afio::detail::doCall (size_t, future<> _, std::shared_ptr< tasktype > c)
template<class T >
future boost::afio::async_dir (future<> _precondition, T _path, file_flags _flags=file_flags::none)
 Asynchronous directory creation and open after an optional precondition.
template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
future boost::afio::async_dir (T _path, file_flags _flags=file_flags::none)
 Asynchronous directory creation and open after an optional precondition.
template<class T >
handle_ptr boost::afio::dir (future<> _precondition, T _path, file_flags _flags=file_flags::none)
 Synchronous directory creation and open after an optional precondition.
template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
handle_ptr boost::afio::dir (T _path, file_flags _flags=file_flags::none)
 Synchronous directory creation and open after an optional precondition.
template<class T >
handle_ptr boost::afio::dir (error_code &_ec, future<> _precondition, T _path, file_flags _flags=file_flags::none)
 Synchronous directory creation and open after an optional precondition.
template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
handle_ptr boost::afio::dir (error_code &_ec, T _path, file_flags _flags=file_flags::none)
 Synchronous directory creation and open after an optional precondition.
template<class T = path>
future boost::afio::async_rmdir (future<> _precondition, T _path=path(), file_flags _flags=file_flags::none)
 Asynchronous directory deletion after an optional precondition.
template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
future boost::afio::async_rmdir (T _path, file_flags _flags=file_flags::none)
 Asynchronous directory deletion after an optional precondition.
template<class T = path>
void boost::afio::rmdir (future<> _precondition, T _path=path(), file_flags _flags=file_flags::none)
 Synchronous directory deletion after an optional precondition.
template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
void boost::afio::rmdir (T _path, file_flags _flags=file_flags::none)
 Synchronous directory deletion after an optional precondition.
template<class T = path>
void boost::afio::rmdir (error_code &_ec, future<> _precondition, T _path=path(), file_flags _flags=file_flags::none)
 Synchronous directory deletion after an optional precondition.
template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
void boost::afio::rmdir (error_code &_ec, T _path, file_flags _flags=file_flags::none)
 Synchronous directory deletion after an optional precondition.
template<class T >
future boost::afio::async_file (future<> _precondition, T _path, file_flags _flags=file_flags::none)
 Asynchronous file creation and open after an optional precondition.
template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
future boost::afio::async_file (T _path, file_flags _flags=file_flags::none)
 Asynchronous file creation and open after an optional precondition.
template<class T >
handle_ptr boost::afio::file (future<> _precondition, T _path, file_flags _flags=file_flags::none)
 Synchronous file creation and open after an optional precondition.
template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
handle_ptr boost::afio::file (T _path, file_flags _flags=file_flags::none)
 Synchronous file creation and open after an optional precondition.
template<class T >
handle_ptr boost::afio::file (error_code &_ec, future<> _precondition, T _path, file_flags _flags=file_flags::none)
 Synchronous file creation and open after an optional precondition.
template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
handle_ptr boost::afio::file (error_code &_ec, T _path, file_flags _flags=file_flags::none)
 Synchronous file creation and open after an optional precondition.
template<class T = path>
future boost::afio::async_rmfile (future<> _precondition, T _path=path(), file_flags _flags=file_flags::none)
 Asynchronous file deletion after an optional precondition.
template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
future boost::afio::async_rmfile (T _path, file_flags _flags=file_flags::none)
 Asynchronous file deletion after an optional precondition.
template<class T = path>
void boost::afio::rmfile (future<> _precondition, T _path=path(), file_flags _flags=file_flags::none)
 Synchronous file deletion after an optional precondition.
template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
void boost::afio::rmfile (T _path, file_flags _flags=file_flags::none)
 Synchronous file deletion after an optional precondition.
template<class T = path>
void boost::afio::rmfile (error_code &_ec, future<> _precondition, T _path=path(), file_flags _flags=file_flags::none)
 Synchronous file deletion after an optional precondition.
template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
void boost::afio::rmfile (error_code &_ec, T _path, file_flags _flags=file_flags::none)
 Synchronous file deletion after an optional precondition.
template<class T >
future boost::afio::async_symlink (future<> _precondition, T _path, future<> _target=future<>(), file_flags _flags=file_flags::none)
 Asynchronous symlink creation and open after a precondition.
template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
future boost::afio::async_symlink (T _path, future<> _target=future<>(), file_flags _flags=file_flags::none)
 Asynchronous symlink creation and open after a precondition.
template<class T >
handle_ptr boost::afio::symlink (future<> _precondition, T _path, future<> _target=future<>(), file_flags _flags=file_flags::none)
 Synchronous symlink creation and open after a precondition..
template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
handle_ptr boost::afio::symlink (T _path, future<> _target=future<>(), file_flags _flags=file_flags::none)
 Synchronous symlink creation and open after a precondition.
template<class T >
handle_ptr boost::afio::symlink (error_code &_ec, future<> _precondition, T _path, future<> _target=future<>(), file_flags _flags=file_flags::none)
 Synchronous symlink creation and open after a precondition.
template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
handle_ptr boost::afio::symlink (error_code &_ec, T _path, future<> _target=future<>(), file_flags _flags=file_flags::none)
 Synchronous symlink creation and open after a precondition.
template<class T = path>
future boost::afio::async_rmsymlink (future<> _precondition, T _path=path(), file_flags _flags=file_flags::none)
 Asynchronous symlink deletion after an optional precondition.
template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
future boost::afio::async_rmsymlink (T _path, file_flags _flags=file_flags::none)
 Asynchronous symlink deletion after an optional precondition.
template<class T = path>
void boost::afio::rmsymlink (future<> _precondition, T _path=path(), file_flags _flags=file_flags::none)
 Synchronous symlink deletion after an optional precondition.
template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
void boost::afio::rmsymlink (T _path, file_flags _flags=file_flags::none)
 Synchronous symlink deletion after an optional precondition.
template<class T = path>
void boost::afio::rmsymlink (error_code &_ec, future<> _precondition, T _path=path(), file_flags _flags=file_flags::none)
 Synchronous symlink deletion after an optional precondition.
template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
void boost::afio::rmsymlink (error_code &_ec, T _path, file_flags _flags=file_flags::none)
 Synchronous symlink deletion after an optional precondition.
future boost::afio::async_sync (future<> _precondition)
 Asynchronous content synchronisation with physical storage after a preceding operation.
void boost::afio::sync (future<> _precondition)
 Synchronous content synchronisation with physical storage after a preceding operation.
void boost::afio::sync (error_code &_ec, future<> _precondition)
 Synchronous content synchronisation with physical storage after a preceding operation.
future boost::afio::async_zero (future<> _precondition, std::vector< std::pair< off_t, off_t >> ranges)
 Asynchronous zeroing and deallocation of physical storage ("hole punching") after a preceding operation.
void boost::afio::zero (future<> _precondition, std::vector< std::pair< off_t, off_t >> ranges)
 Synchronous zeroing and deallocation of physical storage ("hole punching") after a preceding operation.
void boost::afio::zero (error_code &_ec, future<> _precondition, std::vector< std::pair< off_t, off_t >> ranges)
 Synchronous zeroing and deallocation of physical storage ("hole punching") after a preceding operation.
future boost::afio::async_close (future<> _precondition)
 Asynchronous file or directory handle close after a preceding operation.
void boost::afio::close (future<> _precondition)
 Synchronous file or directory handle close after a preceding operation.
void boost::afio::close (error_code &_ec, future<> _precondition)
 Synchronous file or directory handle close after a preceding operation.
template<class T >
future boost::afio::async_read (future<> _precondition, T &&v, off_t _where)
 Asynchronous data read after a preceding operation, where offset and total data read must not exceed the present file size.
template<class T >
future boost::afio::async_read (future<> _precondition, T &&v, size_t _length, off_t _where)
 Asynchronous data read after a preceding operation, where offset and total data read must not exceed the present file size.
template<class T >
void boost::afio::read (future<> _precondition, T &&v, off_t _where)
 Synchronous data read after a preceding operation, where offset and total data read must not exceed the present file size.
template<class T >
void boost::afio::read (future<> _precondition, T &&v, size_t _length, off_t _where)
 Synchronous data read after a preceding operation, where offset and total data read must not exceed the present file size.
template<class T >
void boost::afio::read (error_code &_ec, future<> _precondition, T &&v, off_t _where)
 Synchronous data read after a preceding operation, where offset and total data read must not exceed the present file size.
template<class T >
void boost::afio::read (error_code &_ec, future<> _precondition, T &&v, size_t _length, off_t _where)
 Synchronous data read after a preceding operation, where offset and total data read must not exceed the present file size.
template<class T >
future boost::afio::async_write (future<> _precondition, T &&v, off_t _where)
 Asynchronous data write after a preceding operation, where offset and total data written must not exceed the present file size.
template<class T >
future boost::afio::async_write (future<> _precondition, T &&v, size_t _length, off_t _where)
 Asynchronous data write after a preceding operation, where offset and total data written must not exceed the present file size.
template<class T >
void boost::afio::write (future<> _precondition, T &&v, off_t _where)
 Synchronous data write after a preceding operation, where offset and total data written must not exceed the present file size.
template<class T >
void boost::afio::write (future<> _precondition, T &&v, size_t _length, off_t _where)
 Synchronous data write after a preceding operation, where offset and total data written must not exceed the present file size.
template<class T >
void boost::afio::write (error_code &_ec, future<> _precondition, T &&v, off_t _where)
 Synchronous data write after a preceding operation, where offset and total data written must not exceed the present file size.
template<class T >
void boost::afio::write (error_code &_ec, future<> _precondition, T &&v, size_t _length, off_t _where)
 Synchronous data write after a preceding operation, where offset and total data written must not exceed the present file size.
future boost::afio::async_truncate (future<> _precondition, off_t newsize)
 Asynchronous file length truncation after a preceding operation.
void boost::afio::truncate (future<> _precondition, off_t newsize)
 Synchronous file length truncation after a preceding operation.
void boost::afio::truncate (error_code &_ec, future<> _precondition, off_t newsize)
 Synchronous file length truncation after a preceding operation.
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::vector< std::pair
< off_t, off_t > > > 
boost::afio::async_extents (future<> _precondition)
 Asynchronous extent enumeration after a preceding operation.
std::vector< std::pair< off_t,
off_t > > 
boost::afio::extents (future<> _precondition)
 Synchronous extent enumeration after a preceding operation.
std::vector< std::pair< off_t,
off_t > > 
boost::afio::extents (error_code &_ec, future<> _precondition)
 Synchronous extent enumeration after a preceding operation.
future< statfs_t > boost::afio::async_statfs (future<> _precondition, fs_metadata_flags req)
 Asynchronous volume enumeration after a preceding operation.
statfs_t boost::afio::statfs (future<> _precondition, fs_metadata_flags req)
 Synchronous volume enumeration after a preceding operation.
statfs_t boost::afio::statfs (error_code &_ec, future<> _precondition, fs_metadata_flags req)
 Synchronous volume enumeration after a preceding operation.
future boost::afio::depends (future<> precondition, future<> out)
 Make ready a future after a precondition future readies.
BOOST_AFIO_DECL std::vector
< size_t > 
boost::afio::utils::page_sizes (bool only_actually_available=true) noexcept
 Returns the page sizes of this architecture which is useful for calculating direct i/o multiples.
size_t boost::afio::utils::file_buffer_default_size () noexcept
 Returns a reasonable default size for page_allocator, typically the closest page size from page_sizes() to 1Mb.
BOOST_AFIO_DECL void boost::afio::utils::random_fill (char *buffer, size_t bytes)
 Fills the buffer supplied with cryptographically strong randomness. Uses the OS kernel API.
size_t boost::afio::utils::to_hex_string (char *out, size_t outlen, const char *_in, size_t inlen)
 Converts a number to a hex string. Out buffer can be same as in buffer.
std::string boost::afio::utils::to_hex_string (std::string in)
size_t boost::afio::utils::from_hex_string (char *out, size_t outlen, const char *in, size_t inlen)
 Converts a hex string to a number. Out buffer can be same as in buffer.
std::string boost::afio::utils::random_string (size_t randomlen)
 Returns a cryptographically random string capable of being used as a filename. Essentially random_fill() + to_hex_string().
large_page_allocation boost::afio::utils::detail::calculate_large_page_allocation (size_t bytes)
BOOST_AFIO_DECL
large_page_allocation 
boost::afio::utils::detail::allocate_large_pages (size_t bytes)
BOOST_AFIO_DECL void boost::afio::utils::detail::deallocate_large_pages (void *p, size_t bytes)
template<class T , class U >
bool boost::afio::utils::operator== (const page_allocator< T > &, const page_allocator< U > &) noexcept

Variables

static const char * boost::afio::detail::optypes []

Detailed Description

Provides a batch asynchronous file i/o implementation based on Boost.ASIO.

Definition in file afio.hpp.


Define Documentation

#define BOOST_AFIO_HEADERS_ONLY   0

Determines if AFIO is compiled as headers only. Defaults to 1.

Determines if AFIO is bound against Boost.Thread or the C++ 11 STL thread. Defaults to 0.

Determines if AFIO is bound against Boost.Filesystem or the C++ 1z Filesystem TS. Defaults to 1 unless on VS2015 which provides a full Filesystem TS implementation.

#define ASIO_STANDALONE   0

Determines if AFIO is bound against standalone ASIO or Boost.ASIO. Defaults to undefined, and therefore Boost.ASIO.

#define BOOST_AFIO_DECLARE_CLASS_ENUM_AS_BITFIELD (   type)
Value:
inline constexpr type operator&(type a, type b) \
{ \
    return static_cast<type>(static_cast<size_t>(a) & static_cast<size_t>(b)); \
} \
inline constexpr type operator|(type a, type b) \
{ \
    return static_cast<type>(static_cast<size_t>(a) | static_cast<size_t>(b)); \
} \
inline constexpr type operator~(type a) \
{ \
    return static_cast<type>(~static_cast<size_t>(a)); \
} \
inline constexpr bool operator!(type a) \
{ \
    return 0==static_cast<size_t>(a); \
}

Definition at line 661 of file afio.hpp.

#define BOOST_AFIO_ROUND (   n)
Value:
prefetch[0]=ecc_table[(i+0)*8+n]; \
          prefetch[1]=ecc_table[(i+1)*8+n]; \
          prefetch[2]=ecc_table[(i+2)*8+n]; \
          prefetch[3]=ecc_table[(i+3)*8+n]; \
          prefetch[4]=ecc_table[(i+4)*8+n]; \
          prefetch[5]=ecc_table[(i+5)*8+n]; \
          prefetch[6]=ecc_table[(i+6)*8+n]; \
          prefetch[7]=ecc_table[(i+7)*8+n]; \
          if(c[0]&((unit_type)1<<n))\
            ecc^=prefetch[0];\
          if(c[1]&((unit_type)1<<n))\
            ecc^=prefetch[1];\
          if(c[2]&((unit_type)1<<n))\
            ecc^=prefetch[2];\
          if(c[3]&((unit_type)1<<n))\
            ecc^=prefetch[3];\
          if(c[4]&((unit_type)1<<n))\
            ecc^=prefetch[4];\
          if(c[5]&((unit_type)1<<n))\
            ecc^=prefetch[5];\
          if(c[6]&((unit_type)1<<n))\
            ecc^=prefetch[6];\
          if(c[7]&((unit_type)1<<n))\
            ecc^=prefetch[7];

January, 2014

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