The path component of a URI.
More...
#include <URI.hh>
The path component of a URI.
◆ URIPath() [1/3]
◆ URIPath() [2/3]
Copy constructor.
- Parameters
-
◆ URIPath() [3/3]
Construct a URIPath object from a string.
- Parameters
-
◆ ~URIPath()
◆ Clear()
Remove all parts of the path.
◆ IsAbsolute()
bool IsAbsolute |
( |
| ) |
const |
Returns whether the path is absolute or not.
- Returns
- Whether the path is absolute or not.
◆ operator/()
Get the current path with the _part added to the end.
- Parameters
-
- Returns
- A new Path that consists of "this / _part"
- See also
- PushBack
◆ operator/=()
Compound assignment operator.
- Parameters
-
[in] | _part | A new path to append. |
- Returns
- A new Path that consists of "this / _part"
◆ operator=()
Assignment operator.
- Parameters
-
- Returns
- Itself.
◆ operator==()
bool operator== |
( |
const URIPath & |
_path | ) |
const |
Return true if the two paths match.
- Parameters
-
[in] | _part | Path part. return True of the paths match. |
◆ Parse()
Parse a string as URIPath.
- Parameters
-
- Returns
- True if the string could be parsed as a URIPath.
◆ PushBack()
Push a new part onto the back of this path.
- Parameters
-
[in] | _part | Path part to push |
- See also
- operator/ Empty _part is ignored. If _part starts with / and the path is empty, the path is set to absolute (though calling SetAbsolute() is the preferred method). All forward slashes inside the string are URI-encoded to %2F. The path is also set to absolute if it is empty and a Windows drive specifier (e.g. 'C:') is pushed to it.
◆ PushFront()
Push a new part onto the front of this path.
- Parameters
-
[in] | _part | Path part to push Empty _part is ignored. If _part starts with /, the path is set to absolute (though calling SetAbsolute() is the preferred method). All forward slashes inside the string are URI-encoded to %2F. The path is also set to absolute if a Windows drive specifier (e.g. 'C:') is pushed to the front. |
◆ SetAbsolute()
void SetAbsolute |
( |
bool |
_absolute = true | ) |
|
Set whether the path is to be treated absolute or not.
- Parameters
-
[in] | _absolute | Whether the path is to be treated absolute or not. |
- Note
- If this path starts with a Windows drive specifier (e.g. 'C:'), it cannot be set non-absolute.
◆ SetRelative()
Set the path to be relative.
- Note
- If this path starts with a Windows drive specifier (e.g. 'C:'), it cannot be set relative.
◆ Str()
Get the path as a string.
- Parameters
-
[in] | _delim | Delimiter used to separate each part of the path. |
- Returns
- The path as a string, with each path part separated by _delim.
◆ Valid() [1/2]
Return true if this is a valid path.
- Returns
- True if this is a valid URI path.
◆ Valid() [2/2]
Return true if the string is a valid path.
- Parameters
-
- Returns
- True if _str is a valid URI path.
The documentation for this class was generated from the following file: