20 #ifndef MPD_FS_PATH_HXX
21 #define MPD_FS_PATH_HXX
48 constexpr Path(
const Path &) =
default;
56 static constexpr Path
Null() {
136 std::string
ToUTF8()
const;
Simple OO wrapper for a const string pointer.
gcc_pure Path GetBase() const
Determine the "base" file name.
Path & operator=(const Path &)=default
Copy a Path object.
constexpr bool IsNull() const
Check if this is a "nulled" instance.
gcc_pure const_pointer_type Relative(Path other_fs) const
Determine the relative part of the given path to this object, not including the directory separator...
void SetNull()
Clear this object's value, make it "nulled".
A path name in the native file system character set.
gcc_pure size_t length() const
constexpr const_pointer_type c_str() const
gcc_pure static gcc_nonnull_all const_pointer_type Relative(const_pointer_type base, const_pointer_type other)
Determine the relative part of the given path to this object, not including the directory separator...
static constexpr Path FromFS(const_pointer_type fs)
Create a new instance pointing to the specified path string.
gcc_pure static gcc_nonnull_all const_pointer_type GetBase(const_pointer_type p)
Determine the "base" file name of the given native path.
A path name in the native file system character set.
bool IsNull() const
Check if this is a "nulled" instance.
gcc_pure static gcc_nonnull_all const_pointer_type Find(const_pointer_type p, value_type ch)
const T * const_pointer_type
gcc_pure const_pointer_type data() const
Returns a pointer to the raw value, not necessarily null-terminated.
gcc_pure std::string ToUTF8() const
Convert the path to UTF-8.
gcc_pure static gcc_nonnull_all size_t GetLength(const_pointer_type p)
gcc_pure bool IsAbsolute() const
gcc_pure AllocatedPath GetDirectoryName() const
Gets directory name of this path.
gcc_pure bool HasNewline() const
Does the path contain a newline character? (Which is usually rejected by MPD because its protocol can...
static constexpr Path Null()
Return a "nulled" instance.
gcc_pure const_pointer_type c_str() const
Returns the value as a const C string.
gcc_pure static gcc_nonnull_all bool IsAbsolute(const_pointer_type p)
gcc_pure const_pointer_type GetSuffix() const