Boost.AFIO    Boost C++ Libraries
Functions
Opening/Creating Files

Functions

virtual std::vector< future<> > boost::afio::dispatcher::file (const std::vector< path_req > &reqs)=0
 Schedule a batch of asynchronous file creations and opens after optional preconditions.
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.

Function Documentation

future boost::afio::dispatcher::file ( const std::vector< path_req > &  reqs) [pure virtual]

Schedule a batch of asynchronous file creations and opens after optional preconditions.

Be aware that any files created are by default sparse if supported on the local filing system. On Windows opening any file for writing converts it to sparse. Use file_flags::no_sparse to prevent this on those filing systems which permit it.

Related types: `__afio_path_req__` Be aware that on Windows AFIO operates exclusively in the NT kernel namespace, NOT the Win32 namespace, and therefore paths you supply are converted by `afio::path` in NT kernel namespace paths. `normalise_path()` can convert an afio path back to a Filesystem TS path for you, but note that this may not be the path that was supplied originally. NT kernel namespace paths have a 32,767 character limit and an almost POSIX like lack of restrictions on naming or historical behaviour quirks, but as a result AFIO does not support DOS short names or any of the other historical Win32 filing system baggage.

Returns:
A batch of op handles.
Parameters:
reqsA batch of `path_req` structures.
{ [raceguarantee FreeBSD, Linux, Windows..Race free up to the containing directory.] [raceguarantee OS X..No guarantees.] }

Definition at line 3622 of file afio.hpp.

template<class T >
future boost::afio::async_file ( future<>  _precondition,
_path,
file_flags  _flags = file_flags::none 
)

Asynchronous file creation and open after an optional precondition.

Template Parameters:
class TThe type of path to use.
Returns:
A future<void>
Parameters:
_preconditionThe precondition to use.
_pathThe filing system path to use.
_flagsThe flags to use.

{distinguish, relative} { [raceguarantee FreeBSD, Linux, Windows..Race free up to the containing directory.] [raceguarantee OS X..No guarantees.] } {Amortised O(1) to dispatch. Amortised O(1) to complete if file creation is constant time.} {filedir_example}

Definition at line 4316 of file afio.hpp.

template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
future boost::afio::async_file ( _path,
file_flags  _flags = file_flags::none 
)

Asynchronous file creation and open after an optional precondition.

Template Parameters:
class TThe type of path to use.
Returns:
A future<void>
Parameters:
_pathThe filing system path to use.
_flagsThe flags to use.

{distinguish, absolute} { [raceguarantee FreeBSD, Linux, OS X, Windows..No guarantees.] } {Amortised O(1) to dispatch. Amortised O(1) to complete if file creation is constant time.} {filedir_example}

Definition at line 4338 of file afio.hpp.

template<class T >
handle_ptr boost::afio::file ( future<>  _precondition,
_path,
file_flags  _flags = file_flags::none 
)

Synchronous file creation and open after an optional precondition.

Template Parameters:
class TThe type of path to use.
Returns:
A handle to the file.
Parameters:
_preconditionThe precondition to use.
_pathThe filing system path to use.
_flagsThe flags to use.

{distinguish, relative throwing} { [raceguarantee FreeBSD, Linux, Windows..Race free up to the containing directory.] [raceguarantee OS X..No guarantees.] } {Amortised O(1) to dispatch. Amortised O(1) to complete if file creation is constant time.} {filedir_example}

Definition at line 4362 of file afio.hpp.

template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
handle_ptr boost::afio::file ( _path,
file_flags  _flags = file_flags::none 
)

Synchronous file creation and open after an optional precondition.

Template Parameters:
class TThe type of path to use.
Returns:
A handle to the file.
Parameters:
_pathThe filing system path to use.
_flagsThe flags to use.

{distinguish, absolute throwing} { [raceguarantee FreeBSD, Linux, OS X, Windows..No guarantees.] } {Amortised O(1) to dispatch. Amortised O(1) to complete if file creation is constant time.} {filedir_example}

Definition at line 4384 of file afio.hpp.

template<class T >
handle_ptr boost::afio::file ( error_code &  _ec,
future<>  _precondition,
_path,
file_flags  _flags = file_flags::none 
)

Synchronous file creation and open after an optional precondition.

Template Parameters:
class TThe type of path to use.
Returns:
A handle to the file.
Parameters:
_ecError code to set.
_preconditionThe precondition to use.
_pathThe filing system path to use.
_flagsThe flags to use.

{distinguish, relative non throwing} { [raceguarantee FreeBSD, Linux, Windows..Race free up to the containing directory.] [raceguarantee OS X..No guarantees.] } {Amortised O(1) to dispatch. Amortised O(1) to complete if file creation is constant time.} {filedir_example}

Definition at line 4409 of file afio.hpp.

template<class T , typename = typename std::enable_if<detail::is_not_handle<T>::value>::type>
handle_ptr boost::afio::file ( error_code &  _ec,
_path,
file_flags  _flags = file_flags::none 
)

Synchronous file creation and open after an optional precondition.

Template Parameters:
class TThe type of path to use.
Returns:
A handle to the file.
Parameters:
_ecError code to set.
_pathThe filing system path to use.
_flagsThe flags to use.

{distinguish, absolute non throwing} { [raceguarantee FreeBSD, Linux, OS X, Windows..No guarantees.] } {Amortised O(1) to dispatch. Amortised O(1) to complete if file creation is constant time.} {filedir_example}

Definition at line 4432 of file afio.hpp.


January, 2014

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