|
Devel Lib
|
A class that encapsulates the functionality of std::filesystem::path. More...
#include <Path.h>
Public Member Functions | |
| CPath ()=default | |
| Default constructor. | |
| CPath (fs::path i_oPath) | |
| Construct from a std::filesystem::path. More... | |
| CPath (const CPath &i_oPath) | |
| Copy constructor. More... | |
| CPath (CPath &&i_oPath) noexcept | |
| Move constructor. More... | |
| void | setPath (fs::path i_oPath) |
| Sets the path. More... | |
| fs::path | replaceFilename (const fs::path &i_oFilename) |
| Replaces the filename in the path. More... | |
| fs::path | replaceExtension (const fs::path &i_oExtension) |
| Replaces the extension in the path. More... | |
| fs::path | getRootName () const |
| Returns the root name of the path. More... | |
| fs::path | getRootPath () const |
| Returns the root directory of the path. More... | |
| fs::path | getRelativePath () const |
| Returns the relative path. More... | |
| fs::path | getParentPath () const |
| Returns the parent path. More... | |
| fs::path | getFileNameWithoutExtension () const |
| Returns the filename without extension. More... | |
| fs::path | getFileExtension () const |
| Returns the file extension. More... | |
| fs::path | getAbsolutePath () const |
| Returns the absolute path. More... | |
| fs::path | removeFilename () |
| Removes the filename from the path. More... | |
| const fs::path & | getPath () const |
| Returns the encapsulated fs::path object. More... | |
| std::string | toStdString () const |
| Converts the path to a standard string. More... | |
| std::wstring | toStdWString () const |
| Converts the path to a standard wide string. More... | |
| bool | hasRootName () const |
| Checks if the path has a root name. More... | |
| bool | hasRootDirectory () const |
| Checks if the path has a root directory. More... | |
| bool | hasRelativePath () const |
| Checks if the path has a relative path. More... | |
| bool | hasParentPath () const |
| Checks if the path has a parent path. More... | |
| bool | hasFilename () const |
| Checks if the path has a filename. More... | |
| bool | hasFileNameWithoutExtension () const |
| Checks if the path has a filename without extension. More... | |
| bool | hasExtension () const |
| Checks if the path has an extension. More... | |
| bool | isAbsolutePath () const |
| Checks if the path is absolute. More... | |
| bool | isRelativePath () const |
| Checks if the path is relative. More... | |
| auto | begin () |
| Returns an iterator to the beginning of the path. More... | |
| auto | end () |
| Returns an iterator to the end of the path. More... | |
| bool | exists () const |
| Checks whether the path exists. More... | |
| CPath & | operator= (fs::path i_oPath) |
| Assigns a new path to the object. More... | |
| CPath & | operator= (const CPath &i_oPath) |
| Assigns a new path to the object. More... | |
| CPath & | operator= (CPath &&i_oPath) |
| Assigns a new path to the object. More... | |
| CPath & | operator+= (const fs::path &i_oPath) |
| Appends a path to the current path. More... | |
| CPath & | operator+= (const CPath &i_oPath) |
| Appends a path to the current path. More... | |
Static Public Member Functions | |
| static bool | exists (const fs::path &i_oPath) |
| Checks whether a path exists. More... | |
A class that encapsulates the functionality of std::filesystem::path.
This class provides an interface for manipulating and inspecting file paths.
Example
|
inlineexplicit |
Construct from a std::filesystem::path.
| i_oPath | - The path to encapsulate. |
|
inline |
Copy constructor.
| i_oPath | - The path to copy. |
|
inlinenoexcept |
Move constructor.
| i_oPath | - The path to move. |
|
inline |
Returns an iterator to the beginning of the path.
|
inline |
Returns an iterator to the end of the path.
|
inline |
Checks whether the path exists.
|
inlinestatic |
Checks whether a path exists.
| i_oPath | - The path to check. |
|
inline |
Returns the absolute path.
|
inline |
Returns the file extension.
|
inline |
Returns the filename without extension.
|
inline |
Returns the parent path.
|
inline |
Returns the encapsulated fs::path object.
|
inline |
Returns the relative path.
|
inline |
Returns the root name of the path.
|
inline |
Returns the root directory of the path.
|
inline |
Checks if the path has an extension.
|
inline |
Checks if the path has a filename.
|
inline |
Checks if the path has a filename without extension.
|
inline |
Checks if the path has a parent path.
|
inline |
Checks if the path has a relative path.
|
inline |
Checks if the path has a root directory.
|
inline |
Checks if the path has a root name.
|
inline |
Checks if the path is absolute.
|
inline |
Checks if the path is relative.
Appends a path to the current path.
| i_oPath | - The path to append. |
|
inline |
Appends a path to the current path.
| i_oPath | - The path to append. |
Assigns a new path to the object.
| i_oPath | - The new path. |
Assigns a new path to the object.
| i_oPath | - The new path. |
|
inline |
Assigns a new path to the object.
| i_oPath | - The new path. |
|
inline |
Removes the filename from the path.
|
inline |
Replaces the extension in the path.
| i_oExtension | - The new extension. |
|
inline |
Replaces the filename in the path.
| i_oFilename | - The new filename. |
|
inline |
Sets the path.
| i_oPath | - The new path. |
|
inline |
Converts the path to a standard string.
|
inline |
Converts the path to a standard wide string.