49 constexpr URL()
noexcept =
default;
50 explicit URL(std::string_view url);
51 explicit URL(
char const *url);
55 URL(
URL const &other) noexcept : value(other.value)
57 tt_axiom(&other !=
this);
59 URL(
URL &&other)
noexcept =
default;
60 URL &operator=(
URL const &other)
noexcept
67 URL &operator=(
URL &&other)
noexcept =
default;
69 explicit operator bool()
const noexcept
74 [[nodiscard]]
bool empty()
const noexcept
79 [[nodiscard]]
size_t hash()
const noexcept;
81 [[nodiscard]] std::string_view scheme()
const noexcept;
85 [[nodiscard]]
std::string fragment()
const noexcept;
87 [[nodiscard]]
std::string filename()
const noexcept;
89 [[nodiscard]]
std::string directory()
const noexcept;
91 [[nodiscard]]
std::string nativeDirectory()
const noexcept;
93 [[nodiscard]]
std::string extension()
const noexcept;
99 [[nodiscard]]
std::string nativePath()
const noexcept;
101 [[nodiscard]]
std::wstring nativeWPath()
const noexcept;
103 [[nodiscard]]
bool isFileScheme()
const noexcept
105 return scheme() ==
"file";
108 [[nodiscard]]
bool isAbsolute()
const noexcept;
109 [[nodiscard]]
bool isRelative()
const noexcept;
110 [[nodiscard]]
bool isRootDirectory()
const noexcept;
112 [[nodiscard]]
URL urlByAppendingPath(
URL const &other)
const noexcept;
114 [[nodiscard]]
URL urlByAppendingPath(std::string_view
const other)
const noexcept;
115 [[nodiscard]]
URL urlByAppendingPath(
std::string const &other)
const noexcept;
116 [[nodiscard]]
URL urlByAppendingPath(
char const *other)
const noexcept;
118 [[nodiscard]]
URL urlByAppendingPath(std::wstring_view
const other)
const noexcept;
119 [[nodiscard]]
URL urlByAppendingPath(
std::wstring const &other)
const noexcept;
120 [[nodiscard]]
URL urlByAppendingPath(
wchar_t const *other)
const noexcept;
122 [[nodiscard]]
URL urlByAppendingExtension(std::string_view other)
const noexcept;
123 [[nodiscard]]
URL urlByAppendingExtension(
std::string const &other)
const noexcept;
124 [[nodiscard]]
URL urlByAppendingExtension(
char const *other)
const noexcept;
126 [[nodiscard]]
URL urlByRemovingFilename()
const noexcept;
145 [[nodiscard]] static
URL urlFromPath(
std::string_view const path) noexcept;
146 [[nodiscard]] static
URL urlFromWPath(
std::wstring_view const path) noexcept;
148 static
void setUrlForCurrentWorkingDirectory(
URL url) noexcept;
149 [[nodiscard]] static
URL urlFromCurrentWorkingDirectory() noexcept;
150 [[nodiscard]] static
URL urlFromResourceDirectory() noexcept;
151 [[nodiscard]] static
URL urlFromExecutableDirectory() noexcept;
152 [[nodiscard]] static
URL urlFromExecutableFile() noexcept;
153 [[nodiscard]] static
URL urlFromApplicationDataDirectory() noexcept;
154 [[nodiscard]] static
URL urlFromApplicationLogDirectory() noexcept;
155 [[nodiscard]] static
URL urlFromSystemfontDirectory() noexcept;
156 [[nodiscard]] static
URL urlFromApplicationPreferencesFile() noexcept;
164 [[nodiscard]] static
std::
string nativePathFromPath(
std::string_view path) noexcept;
165 [[nodiscard]] static
std::wstring nativeWPathFromPath(
std::string_view path) noexcept;
167 [[nodiscard]] friend
bool operator==(
URL const &lhs,
URL const &rhs) noexcept
169 return lhs.value == rhs.value;
172 [[nodiscard]]
friend auto operator<=>(
URL const &lhs,
URL const &rhs)
noexcept
174 return lhs.value <=> rhs.value;
177 [[nodiscard]]
friend URL operator/(URL
const &lhs, URL
const &rhs)
noexcept
179 return lhs.urlByAppendingPath(rhs);
182 [[nodiscard]]
friend URL operator/(URL
const &lhs, std::string_view
const &rhs)
noexcept
184 return lhs.urlByAppendingPath(URL{rhs});
187 [[nodiscard]]
friend std::string const &to_string(URL
const &url)
noexcept
194 return lhs << to_string(rhs);
200 static URL _urlOfCurrentWorkingDirectory;