Collection of methods to manipulate path.
More...
#include <Path.h>
Collection of methods to manipulate path.
Definition at line 16 of file Path.h.
◆ Path() [1/4]
Construct path.
Definition at line 22 of file Path.cpp.
◆ Path() [2/4]
| utils::Path::Path |
( |
const char * | path | ) |
|
Construct path.
- Parameters
-
| path | The path in char format |
Definition at line 29 of file Path.cpp.
◆ Path() [3/4]
| utils::Path::Path |
( |
const String & | path | ) |
|
Construct path.
- Parameters
-
| path | The path in string format |
Definition at line 39 of file Path.cpp.
◆ Path() [4/4]
| utils::Path::Path |
( |
const std::basic_string< char > & | path | ) |
|
Construct path.
- Parameters
-
| path | The path in vector char format |
Definition at line 49 of file Path.cpp.
◆ absoluteFolder() [1/2]
Return the absolute folder relative to root.
- Returns
- The absolute folder relative to root
Definition at line 257 of file Path.cpp.
◆ absoluteFolder() [2/2]
Return the absolute path relative to root.
- Parameters
-
| path | The path to find the path |
- Returns
- The absolute folder
On Windows, the current implementation only works if the file is on the C drive.
Definition at line 235 of file Path.cpp.
◆ absolutePath()
Return the absolute path relative to root.
- Returns
- The absolute path relative to root
Definition at line 265 of file Path.cpp.
◆ createFolder()
| void utils::Path::createFolder |
( |
| ) |
const |
To create folder on the computer.
Definition at line 361 of file Path.cpp.
◆ currentDir()
/brief Return current directory
- Returns
- Teh current directory
Definition at line 349 of file Path.cpp.
◆ DeepCopy() [1/2]
Deep copy of path.
- Returns
- A deep copy of path
Definition at line 59 of file Path.cpp.
◆ DeepCopy() [2/2]
| void utils::Path::DeepCopy |
( |
const Path & | other | ) |
|
Deep copy of path from another path.
- Parameters
-
Definition at line 65 of file Path.cpp.
◆ extension()
Return the extension of the file.
- Returns
- The extension of the file
Definition at line 325 of file Path.cpp.
◆ filename()
Return the filename.
- Returns
- The filename
Definition at line 321 of file Path.cpp.
◆ folder()
Return the folder of the file.
- Returns
- The folder of the file
Definition at line 317 of file Path.cpp.
◆ isFileExist() [1/3]
| bool utils::Path::isFileExist |
( |
| ) |
const |
Test if file exist on the computer.
- Returns
- If file exist on the computer
Definition at line 73 of file Path.cpp.
◆ isFileExist() [2/3]
| bool utils::Path::isFileExist |
( |
const Path & | path | ) |
|
|
static |
Test if file exist on the computer.
- Parameters
-
- Returns
- If file exist on the computer
Definition at line 74 of file Path.cpp.
◆ isFileExist() [3/3]
| bool utils::Path::isFileExist |
( |
const String & | path | ) |
|
|
static |
Test if file exist on the computer.
- Parameters
-
- Returns
- If file exist on the computer
Definition at line 77 of file Path.cpp.
◆ isFileReadable()
| bool utils::Path::isFileReadable |
( |
| ) |
const |
Test if file exist on the computer and is accessible.
- Returns
- If file is readable
Definition at line 92 of file Path.cpp.
◆ isFolderExist() [1/3]
| bool utils::Path::isFolderExist |
( |
| ) |
const |
Test if folder exists on the computer.
- Returns
- If folder exists
Definition at line 105 of file Path.cpp.
◆ isFolderExist() [2/3]
| bool utils::Path::isFolderExist |
( |
const Path & | path | ) |
|
|
static |
Test if folder exists on the computer.
- Parameters
-
| path | The path in which to test if the folder exists |
- Returns
- If folder exists
Definition at line 107 of file Path.cpp.
◆ isFolderExist() [3/3]
| bool utils::Path::isFolderExist |
( |
const String & | path | ) |
|
|
static |
Test if folder exists on the computer.
- Parameters
-
| path | The path in which to test if the folder exists |
- Returns
- If folder exists
Definition at line 111 of file Path.cpp.
◆ originalPath()
Return original path as it was at constructor time.
- Returns
- The original path
Definition at line 308 of file Path.cpp.
◆ parseFileName()
Parse a path in folder, filename and extension.
- Parameters
-
| path | The path to parse |
| folder | The folder of the file |
| filename | The file name |
| extension | The extension of the file |
Definition at line 134 of file Path.cpp.
◆ relativePath() [1/3]
Return relative path to current working directory.
- Returns
- The relative path to curent working directory
Definition at line 169 of file Path.cpp.
◆ relativePath() [2/3]
Return relative path of a specified path to the specified folder.
- Parameters
-
| path | The path to find the relative path from |
| relativeTo | Relative to that path |
- Returns
- The relative path
Definition at line 177 of file Path.cpp.
◆ relativePath() [3/3]
Return relative path to the specified folder.
- Parameters
-
| relativeTo | Relative to that path |
- Returns
- The relative path
Definition at line 173 of file Path.cpp.
◆ setExtension()
| void utils::Path::setExtension |
( |
const String & | ext | ) |
|
Set the extension.
- Parameters
-
Definition at line 323 of file Path.cpp.
◆ setFilename()
| void utils::Path::setFilename |
( |
const String & | name | ) |
|
Set the filename.
- Parameters
-
Definition at line 319 of file Path.cpp.
◆ setFolder()
| void utils::Path::setFolder |
( |
const String & | folder | ) |
|
Set the folder of the file.
- Parameters
-
| folder | The folder of the file |
Definition at line 312 of file Path.cpp.
◆ setIsFolderAbsolute()
| void utils::Path::setIsFolderAbsolute |
( |
| ) |
|
|
protected |
Set if folder is absolute.
Definition at line 327 of file Path.cpp.
◆ toUnixFormat()
Return the path to Unix format.
- Parameters
-
- Returns
- The path in Unix format
Definition at line 277 of file Path.cpp.
◆ toWindowsFormat()
Return the path to Windows format.
- Parameters
-
- Returns
- The path in Windows format
Definition at line 298 of file Path.cpp.
◆ m_extension
| std::shared_ptr<String> BIORBD_NAMESPACE::utils::Path::m_extension |
|
protected |
The extension.
Definition at line 240 of file Path.h.
◆ m_filename
| std::shared_ptr<String> BIORBD_NAMESPACE::utils::Path::m_filename |
|
protected |
The filename.
Definition at line 239 of file Path.h.
◆ m_folder
| std::shared_ptr<String> BIORBD_NAMESPACE::utils::Path::m_folder |
|
protected |
The folder.
Definition at line 237 of file Path.h.
◆ m_isFolderAbsolute
| std::shared_ptr<bool> BIORBD_NAMESPACE::utils::Path::m_isFolderAbsolute |
|
protected |
If folder is absolute.
Definition at line 238 of file Path.h.
◆ m_originalPath
| std::shared_ptr<String> BIORBD_NAMESPACE::utils::Path::m_originalPath |
|
protected |
The original path at construction time.
Definition at line 236 of file Path.h.
The documentation for this class was generated from the following files: