Path: Add CreateFileURL()

This commit is contained in:
Stenzek
2024-03-13 19:39:10 +10:00
parent b9c9b05878
commit 9211d9f2e3
6 changed files with 132 additions and 77 deletions

View File

@ -71,4 +71,13 @@ std::string JoinWindowsPath(const std::vector<std::string_view>& components);
/// Splits a path into its components, only handling native separators.
std::vector<std::string_view> SplitNativePath(const std::string_view& path);
std::string JoinNativePath(const std::vector<std::string_view>& components);
/// URL encodes the specified string.
std::string URLEncode(std::string_view str);
/// Decodes the specified escaped string.
std::string URLDecode(std::string_view str);
/// Returns a URL for a given path. The path should be absolute.
std::string CreateFileURL(std::string_view path);
} // namespace Path