ludus::foundation::filesystem::VirtualPath¶
Ludus Wiki · API overview · Browse API
Class
Owned, byte-exact logical key: explicit root plus bounded UTF-8 relative path. No normalization, case folding or allocation; default construction is invalid.
Declared in modules/foundation/filesystem/include/ludus/foundation/filesystem/namespace.hpp
#include <ludus/foundation/filesystem/namespace.hpp>
class ludus::foundation::filesystem::VirtualPath final
Methods¶
Set¶
Result ludus::foundation::filesystem::VirtualPath::Set(Root root, std::string_view relativePath) noexcept
Validates and copies the key; failure preserves this value. Uses ValidPath rules.
Declared in modules/foundation/filesystem/include/ludus/foundation/filesystem/namespace.hpp
operator==¶
bool ludus::foundation::filesystem::VirtualPath::operator==(const VirtualPath &other) const noexcept
Compares root and exact UTF-8 bytes; two default invalid keys compare equal.
Related types: VirtualPath
Declared in modules/foundation/filesystem/include/ludus/foundation/filesystem/namespace.hpp
IsValid¶
bool ludus::foundation::filesystem::VirtualPath::IsValid() const noexcept
Returns whether a key has been assigned successfully.
Declared in modules/foundation/filesystem/include/ludus/foundation/filesystem/namespace.hpp
GetRoot¶
Root ludus::foundation::filesystem::VirtualPath::GetRoot() const noexcept
Returns the root; meaningful only when IsValid().
Related types: Root
Declared in modules/foundation/filesystem/include/ludus/foundation/filesystem/namespace.hpp
Path¶
std::string_view ludus::foundation::filesystem::VirtualPath::Path() const noexcept
Returns owned path bytes, valid until this object is changed or destroyed.
Declared in modules/foundation/filesystem/include/ludus/foundation/filesystem/namespace.hpp