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