MPD
0.20.18
|
A path name in the native file system character set. More...
#include <Path.hxx>
Public Member Functions | |
constexpr | Path (const Path &)=default |
Copy a Path object. More... | |
Path & | operator= (const Path &)=default |
Copy a Path object. More... | |
bool | IsNull () const |
Check if this is a "nulled" instance. More... | |
void | SetNull () |
Clear this object's value, make it "nulled". More... | |
gcc_pure size_t | length () const noexcept |
gcc_pure const_pointer_type | c_str () const noexcept |
Returns the value as a const C string. More... | |
gcc_pure const_pointer_type | data () const noexcept |
Returns a pointer to the raw value, not necessarily null-terminated. More... | |
gcc_pure bool | HasNewline () const noexcept |
Does the path contain a newline character? (Which is usually rejected by MPD because its protocol cannot transfer newline characters). More... | |
gcc_pure std::string | ToUTF8 () const noexcept |
Convert the path to UTF-8. More... | |
gcc_pure Path | GetBase () const noexcept |
Determine the "base" file name. More... | |
gcc_pure AllocatedPath | GetDirectoryName () const noexcept |
Gets directory name of this path. More... | |
gcc_pure const_pointer_type | Relative (Path other_fs) const noexcept |
Determine the relative part of the given path to this object, not including the directory separator. More... | |
gcc_pure bool | IsAbsolute () const noexcept |
gcc_pure const_pointer_type | GetSuffix () const noexcept |
![]() | |
StringPointer ()=default | |
constexpr | StringPointer (const_pointer_type _value) |
constexpr bool | IsNull () const |
Check if this is a "nulled" instance. More... | |
constexpr const_pointer_type | c_str () const |
bool | empty () const |
Static Public Member Functions | |
static constexpr Path | Null () |
Return a "nulled" instance. More... | |
static constexpr Path | FromFS (const_pointer_type fs) |
Create a new instance pointing to the specified path string. More... | |
Additional Inherited Members | |
![]() | |
typedef T | value_type |
typedef T & | reference_type |
typedef const T & | const_reference_type |
typedef T * | pointer_type |
typedef const T * | const_pointer_type |
![]() | |
static constexpr value_type | SENTINEL = '\0' |
A path name in the native file system character set.
This class manages a pointer to an existing path string. While an instance lives, the string must not be invalidated.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinestatic |
|
noexcept |
Gets directory name of this path.
Returns a "nulled" instance on error.
|
noexcept |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlinestatic |
|
inlinenoexcept |
|
inline |
|
noexcept |
Convert the path to UTF-8.
Returns empty string on error or if this instance is "nulled" (IsNull returns true).