51 explicit URL(std::string_view url);
52 explicit URL(
char const *url);
56 URL(
URL const &other) noexcept : value(other.value) {}
57 URL(
URL &&other)
noexcept =
default;
58 URL &operator=(
URL const &other)
noexcept { value = other.value;
return *
this; }
59 URL &operator=(
URL &&other)
noexcept =
default;
61 [[nodiscard]]
size_t hash()
const noexcept;
64 [[nodiscard]] std::string_view scheme()
const noexcept;
68 [[nodiscard]]
std::string fragment()
const noexcept;
70 [[nodiscard]]
std::string filename()
const noexcept;
72 [[nodiscard]]
std::string directory()
const noexcept;
74 [[nodiscard]]
std::string nativeDirectory()
const noexcept;
76 [[nodiscard]]
std::string extension()
const noexcept;
82 [[nodiscard]]
std::string nativePath()
const noexcept;
86 [[nodiscard]]
bool isFileScheme()
const noexcept {
87 return scheme() ==
"file";
90 [[nodiscard]]
bool isAbsolute()
const noexcept;
91 [[nodiscard]]
bool isRelative()
const noexcept;
92 [[nodiscard]]
bool isRootDirectory()
const noexcept;
94 [[nodiscard]]
URL urlByAppendingPath(
URL const &other)
const noexcept;
96 [[nodiscard]]
URL urlByAppendingPath(std::string_view
const other)
const noexcept;
97 [[nodiscard]]
URL urlByAppendingPath(
std::string const &other)
const noexcept;
98 [[nodiscard]]
URL urlByAppendingPath(
char const *other)
const noexcept;
100 [[nodiscard]]
URL urlByAppendingPath(std::wstring_view
const other)
const noexcept;
101 [[nodiscard]]
URL urlByAppendingPath(
std::wstring const &other)
const noexcept;
102 [[nodiscard]]
URL urlByAppendingPath(
wchar_t const *other)
const noexcept;
104 [[nodiscard]]
URL urlByRemovingFilename()
const noexcept;
123 [[nodiscard]] static
URL urlFromPath(
std::string_view const path) noexcept;
124 [[nodiscard]] static
URL urlFromWPath(
std::wstring_view const path) noexcept;
126 [[nodiscard]] static
URL urlFromCurrentWorkingDirectory() noexcept;
127 [[nodiscard]] static
URL urlFromResourceDirectory() noexcept;
128 [[nodiscard]] static
URL urlFromExecutableDirectory() noexcept;
129 [[nodiscard]] static
URL urlFromExecutableFile() noexcept;
130 [[nodiscard]] static
URL urlFromApplicationDataDirectory() noexcept;
131 [[nodiscard]] static
URL urlFromApplicationLogDirectory() noexcept;
132 [[nodiscard]] static
URL urlFromSystemFontDirectory() noexcept;
140 [[nodiscard]] static
std::
string nativePathFromPath(
std::string_view path) noexcept;
141 [[nodiscard]] static
std::wstring nativeWPathFromPath(
std::string_view path) noexcept;
143 friend
bool operator==(
URL const &lhs,
URL const &rhs) noexcept;
144 friend
bool operator<(
URL const &lhs,
URL const &rhs) noexcept;
179 [[maybe_unused]] ttlet [newResource, dummy] = resourceCache.try_emplace(location,
std::move(parseResource<T>(location)));