The Path class allow handling filesystem path in a cross-platform maner. The class assume that all string are encoded in UTF-8 if not specified otherwise.
More...
#include <path.hpp>
The Path class allow handling filesystem path in a cross-platform maner. The class assume that all string are encoded in UTF-8 if not specified otherwise.
Definition at line 34 of file path.hpp.
qi::Path::Path |
( |
const std::string & |
unicodePath = std::string() | ) |
|
Default Constructor
- Parameters
-
unicodePath | Path value as UTF-8 string. |
qi::Path::Path |
( |
const char * |
unicodePath | ) |
|
- Parameters
-
unicodePath | Path value as UTF-8 string. |
qi::Path::Path |
( |
const Path & |
path | ) |
|
qi::Path::Path |
( |
const boost::filesystem::path & |
path | ) |
|
Copy Constructor from boost filesystem.
Path qi::Path::absolute |
( |
| ) |
const |
- Returns
- an absolute Path of the current path
const boost::filesystem::path& qi::Path::bfsPath |
( |
| ) |
const |
- Returns
- the path as a boost path representation
- Returns
- a vector of dirs contained in the current path
bool qi::Path::exists |
( |
| ) |
const |
std::string qi::Path::extension |
( |
| ) |
const |
- Returns
- the extension of the last component of the path as an UTF-8 string
std::string qi::Path::filename |
( |
| ) |
const |
- Returns
- the last component of the path as an UTF-8 string
- Returns
- a vector of files contained in the current path
static Path qi::Path::fromNative |
( |
const char * |
nativeCharsPath | ) |
|
|
static |
- Returns
- A unicode-safe path from a string containing a native encoding path instead of UTF-8.
static Path qi::Path::fromNative |
( |
const wchar_t * |
nativeCharsPath | ) |
|
|
static |
- Returns
- A unicode-safe path from a string containing a native encoding path instead of UTF-8.
static Path qi::Path::fromNative |
( |
const std::string & |
nativeCharsPath | ) |
|
|
static |
- Returns
- A unicode-safe path from a string containing a native encoding path instead of UTF-8.
static Path qi::Path::fromNative |
( |
const std::wstring & |
nativeCharsPath | ) |
|
|
static |
- Returns
- A unicode-safe path from a string containing a native encoding path instead of UTF-8.
bool qi::Path::isDir |
( |
| ) |
const |
bool qi::Path::isEmpty |
( |
| ) |
const |
bool qi::Path::isRegularFile |
( |
| ) |
const |
is the path a regular file?
bool qi::Path::isSymlink |
( |
| ) |
const |
qi::Path::operator std::string |
( |
| ) |
const |
|
explicit |
- Returns
- the path as an UTF-8 string
bool qi::Path::operator!= |
( |
const qi::Path & |
rhs | ) |
const |
concat two paths adding a directory separator between them
const Path& qi::Path::operator/= |
( |
const qi::Path & |
rhs | ) |
const |
concat two paths adding a directory separator between them
const Path& qi::Path::operator= |
( |
const qi::Path & |
rhs | ) |
const |
bool qi::Path::operator== |
( |
const qi::Path & |
rhs | ) |
const |
Path qi::Path::parent |
( |
| ) |
const |
- Returns
- a Path to the parent
- Returns
- a vector of absolute path to files contained recursively in the current path
std::string qi::Path::str |
( |
| ) |
const |
- Returns
- the path as an UTF-8 string
std::ostream& operator<< |
( |
std::ostream & |
output, |
|
|
const qi::Path & |
path |
|
) |
| |
|
friend |
Standard output stream operator for logging.
Definition at line 125 of file path.hpp.
The documentation for this class was generated from the following file:
- /home/opennao/work/release-2.8/sdk/libqi/qi/path.hpp