Home | Libraries | People | FAQ | More |
Returns the path of this i/o handle right now if the handle is open and refresh is true, else last known good. May be null if the file has been deleted.
Note the refreshed path completely dereferences any intermediate symbolic links to return a truly absolute canonical path, and therefore may look quite different to before. Some operating systems unfortunately also return any one of the hard links to the file, so if hard links is greater than one the path refreshed will randomly permute.
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
in NT kernel namespace
paths. afio::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.
normalise_path()
virtual path handle::path(bool refresh = false)
Type |
Concept |
Name |
Description |
---|---|---|---|
bool |
refresh |
Whether to ask the OS for the current path of this handle. |
The path of this i/o handle right now.
#include <boost/afio/v2/afio.hpp>
Operating system | Race guarantees under a changing file system |
---|---|
FreeBSD | Paths are only refreshed for directories, not files. |
Linux, Windows | Paths are always refreshed and ignore other hard links. |
OS X | Paths are only refreshed for directories and files with a single hard link. |