|
| constexpr | URL () noexcept=default |
| | Create an empty URL.
|
| |
|
constexpr | URL (URL const &) noexcept=default |
| |
|
constexpr | URL (URL &&) noexcept=default |
| |
|
constexpr URL & | operator= (URL const &) noexcept=default |
| |
|
constexpr URL & | operator= (URL &&) noexcept=default |
| |
| constexpr | URL (URI const &other) noexcept |
| | Convert a URI to an URL.
|
| |
| constexpr | URL (URI &&other) noexcept |
| | Convert a URI to an URL.
|
| |
| constexpr | URL (std::string_view str) |
| | Construct a URI from a string.
|
| |
| constexpr | URL (std::string const &str) |
| | Construct a URI from a string.
|
| |
| constexpr | URL (const char *str) |
| | Construct a URI from a string.
|
| |
| | URL (std::filesystem::path const &path) |
| | Convert a filesystem-path to a file-scheme URL.
|
| |
| constexpr std::u8string | filesystem_path_generic_u8string (bool validate_scheme=true) const |
| | Return a generic path.
|
| |
| std::filesystem::path | filesystem_path () const |
| | Create a filesystem path from a file URL.
|
| |
| | operator std::filesystem::path () const |
| |
|
constexpr | URI (URI const &) noexcept=default |
| |
|
constexpr | URI (URI &&) noexcept=default |
| |
|
constexpr URI & | operator= (URI const &) noexcept=default |
| |
|
constexpr URI & | operator= (URI &&) noexcept=default |
| |
| constexpr | URI (std::string_view str) |
| | Construct a URI from a string.
|
| |
| constexpr | URI (std::string const &str) |
| | Construct a URI from a string.
|
| |
| constexpr | URI (const char *str) |
| | Construct a URI from a string.
|
| |
|
constexpr bool | empty () const noexcept |
| |
|
constexpr | operator bool () const noexcept |
| |
| constexpr std::optional< std::string > const & | scheme () const noexcept |
| | Get the scheme-component of the URI.
|
| |
| constexpr URI & | set_scheme (std::optional< std::string > const &rhs) |
| | Get the scheme-component of the URI.
|
| |
| constexpr std::optional< authority_type > const & | authority () const noexcept |
| | Get the authority-component of the URI.
|
| |
|
constexpr URI & | set_authority (std::optional< authority_type > const &rhs) noexcept |
| |
|
constexpr path_type const & | path () const noexcept |
| |
|
constexpr URI & | set_path (path_type const &rhs) |
| |
|
constexpr std::optional< std::string > | filename () const noexcept |
| |
| constexpr URI & | remove_filename () noexcept |
| | Remove the filename part of the path.
|
| |
| constexpr std::optional< std::string > const & | query () const noexcept |
| | Get the query-component of the URI.
|
| |
|
constexpr URI & | set_query (std::optional< std::string > const &rhs) noexcept |
| |
| constexpr std::optional< std::string > const & | fragment () const noexcept |
| | Get the fragment-component of the URI.
|
| |
|
constexpr URI & | set_fragment (std::optional< std::string > const &rhs) noexcept |
| |
|
| static constexpr std::string | decode (std::string_view rhs) |
| | URI percent-encoding decode function.
|
| |
| static constexpr std::string | decode (const_iterator first, const_iterator last) |
| | URI percent-encoding decode function.
|
| |
| template<char... Extras, typename It , typename ItEnd > |
| static constexpr std::string | encode (It first, ItEnd last) noexcept |
| | URI encode a component.
|
| |
| template<char... Extras, typename Range > |
| static constexpr std::string | encode (Range &&range) noexcept |
| | URI encode a component.
|
| |
Universal Resource Locator.
An instance internally holds the URI split into its non-encoded components.
syd::filesystem::path constructors will do context aware normalizations.
'file:' scheme urls can handle the following:
- May contain a server name (placed in either the authority, or path of the url).
- May contain a drive-letter.
- May be absolute or relative, including proper handling of relative path with a named drive.
The URL instance may be relative itself; meaning it does not hold a scheme.
URLs can be implicitly converted to std::filesystem::path.