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

Functions

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

Function Documentation

future boost::afio::dispatcher::symlink ( const std::vector< path_req > &  reqs,
const std::vector< future<>> &  targets = std::vector<future<>>() 
) [pure virtual]

Schedule a batch of asynchronous symlink creations and opens after a precondition.

Note that if creating and you don't specify a target, the target for the symlink is the precondition. On Windows directories are symlinked using a reparse point instead of a symlink due to the default lack of the SeCreateSymbolicLinkPrivilege for non-Administrative users. On Windows you can open symlinks as a file and so a valid handle is output, whereas on POSIX except for Linux you cannot do this and an invalid handle is output.

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.
targetsAn optional batch of targets if creating symlinks.
{ [raceguarantee FreeBSD, Linux, Windows..Link creation is race free up to the containing directory. Destination is unavoidably racy.] [raceguarantee OS X..No guarantees.] }

Definition at line 3638 of file afio.hpp.

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

Asynchronous symlink creation and open after a 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.
_targetThe item to link to if creating.
_flagsThe flags to use.

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

Definition at line 4599 of file afio.hpp.

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

Asynchronous symlink creation and open after a precondition.

Template Parameters:
class TThe type of path to use.
Returns:
A future<void>
Parameters:
_pathThe filing system path to use.
_targetThe item to link to if creating.
_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 symlink creation is constant time.} {filedir_example}

Definition at line 4622 of file afio.hpp.

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

Synchronous symlink creation and open after a precondition..

Template Parameters:
class TThe type of path to use.
Returns:
A handle to the symlink.
Parameters:
_preconditionThe precondition to use.
_pathThe filing system path to use.
_targetThe item to link to if creating.
_flagsThe flags to use.

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

Definition at line 4647 of file afio.hpp.

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

Synchronous symlink creation and open after a precondition.

Template Parameters:
class TThe type of path to use.
Returns:
A handle to the symlink.
Parameters:
_pathThe filing system path to use.
_targetThe item to link to if creating.
_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 symlink creation is constant time.} {filedir_example}

Definition at line 4670 of file afio.hpp.

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

Synchronous symlink creation and open after a precondition.

Template Parameters:
class TThe type of path to use.
Returns:
A handle to the symlink.
Parameters:
_ecError code to set.
_preconditionThe precondition to use.
_pathThe filing system path to use.
_targetThe item to link to if creating.
_flagsThe flags to use.

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

Definition at line 4696 of file afio.hpp.

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

Synchronous symlink creation and open after a precondition.

Template Parameters:
class TThe type of path to use.
Returns:
A handle to the symlink.
Parameters:
_ecError code to set.
_pathThe filing system path to use.
_targetThe item to link to if creating.
_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 symlink creation is constant time.} {filedir_example}

Definition at line 4720 of file afio.hpp.


January, 2014

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