Biorbd
|
Collection of methods to manipulate path. More...
#include <Path.h>
Public Member Functions | |
Path () | |
Construct path. | |
Path (const char *path) | |
Construct path. More... | |
Path (const biorbd::utils::String &path) | |
Construct path. More... | |
Path (const std::basic_string< char > &path) | |
Construct path. More... | |
biorbd::utils::Path | DeepCopy () const |
Deep copy of path. More... | |
void | DeepCopy (const biorbd::utils::Path &other) |
Deep copy of path from another path. More... | |
bool | isFileExist () const |
Test if file exist on the computer. More... | |
bool | isFileReadable () const |
Test if file exist on the computer and is accessible. More... | |
bool | isFolderExist () const |
Test if folder exists on the computer. More... | |
void | createFolder () const |
To create folder on the computer. | |
biorbd::utils::String | relativePath () const |
Return relative path to current working directory. More... | |
biorbd::utils::String | relativePath (const biorbd::utils::String &relativeTo) const |
Return relative path to the specified folder. More... | |
biorbd::utils::String | absoluteFolder () const |
Return the absolute folder relative to root. More... | |
biorbd::utils::String | absolutePath () const |
Return the absolute path relative to root. More... | |
const biorbd::utils::String & | originalPath () const |
Return original path as it was at constructor time. More... | |
const biorbd::utils::String & | folder () const |
Return the folder of the file. More... | |
void | setFilename (const biorbd::utils::String &name) |
Set the filename. More... | |
const biorbd::utils::String & | filename () const |
Return the filename. More... | |
void | setExtension (const biorbd::utils::String &ext) |
Set the extension. More... | |
const biorbd::utils::String & | extension () const |
Return the extension of the file. More... | |
Static Public Member Functions | |
static void | parseFileName (const biorbd::utils::String &path, biorbd::utils::String &folder, biorbd::utils::String &filename, biorbd::utils::String &ext) |
Parse a path in folder, filename and extension. More... | |
static bool | isFileExist (const biorbd::utils::Path &path) |
Test if file exist on the computer. More... | |
static bool | isFileExist (const biorbd::utils::String &path) |
Test if file exist on the computer. More... | |
static bool | isFolderExist (const biorbd::utils::Path &path) |
Test if folder exists on the computer. More... | |
static bool | isFolderExist (const biorbd::utils::String &path) |
Test if folder exists on the computer. More... | |
static biorbd::utils::String | currentDir () |
static biorbd::utils::String | relativePath (const biorbd::utils::Path &path, const biorbd::utils::String &relativeTo) |
Return relative path of a specified path to the specified folder. More... | |
static biorbd::utils::String | absoluteFolder (const biorbd::utils::Path &path) |
Return the absolute path relative to root. More... | |
static biorbd::utils::String | toUnixFormat (const biorbd::utils::String &path) |
Return the path to Unix format. More... | |
static biorbd::utils::String | toWindowsFormat (const biorbd::utils::String &path) |
Return the path to Windows format. More... | |
Protected Member Functions | |
void | setIsFolderAbsolute () |
Set if folder is absolute. | |
Protected Attributes | |
std::shared_ptr< biorbd::utils::String > | m_originalPath |
The original path at construction time. | |
std::shared_ptr< biorbd::utils::String > | m_folder |
The folder. | |
std::shared_ptr< bool > | m_isFolderAbsolute |
If folder is absolute. | |
std::shared_ptr< biorbd::utils::String > | m_filename |
The filename. | |
std::shared_ptr< biorbd::utils::String > | m_extension |
The extension. | |
biorbd::utils::Path::Path | ( | const char * | path | ) |
biorbd::utils::Path::Path | ( | const biorbd::utils::String & | path | ) |
biorbd::utils::Path::Path | ( | const std::basic_string< char > & | path | ) |
biorbd::utils::String biorbd::utils::Path::absoluteFolder | ( | ) | const |
|
static |
biorbd::utils::String biorbd::utils::Path::absolutePath | ( | ) | const |
|
static |
biorbd::utils::Path biorbd::utils::Path::DeepCopy | ( | ) | const |
void biorbd::utils::Path::DeepCopy | ( | const biorbd::utils::Path & | other | ) |
const biorbd::utils::String & biorbd::utils::Path::extension | ( | ) | const |
const biorbd::utils::String & biorbd::utils::Path::filename | ( | ) | const |
const biorbd::utils::String & biorbd::utils::Path::folder | ( | ) | const |
bool biorbd::utils::Path::isFileExist | ( | ) | const |
|
static |
|
static |
bool biorbd::utils::Path::isFileReadable | ( | ) | const |
bool biorbd::utils::Path::isFolderExist | ( | ) | const |
|
static |
|
static |
const biorbd::utils::String & biorbd::utils::Path::originalPath | ( | ) | const |
|
static |
biorbd::utils::String biorbd::utils::Path::relativePath | ( | ) | const |
|
static |
biorbd::utils::String biorbd::utils::Path::relativePath | ( | const biorbd::utils::String & | relativeTo | ) | const |
void biorbd::utils::Path::setExtension | ( | const biorbd::utils::String & | ext | ) |
void biorbd::utils::Path::setFilename | ( | const biorbd::utils::String & | name | ) |
|
static |
|
static |