|
HikoGUI
A low latency retained GUI
|
#include <hikogui/URL.hpp>
Public Member Functions | |
| constexpr | URL (URL const &) noexcept=default |
| constexpr | URL (URL &&) noexcept=default |
| constexpr URL & | operator= (URL const &) noexcept=default |
| constexpr URL & | operator= (URL &&) noexcept=default |
| URL (std::string_view url) | |
| URL (char const *url) | |
| URL (std::string const &url) | |
| URL (url_parts const &parts) | |
| operator bool () const noexcept | |
| bool | empty () const noexcept |
| std::size_t | hash () const noexcept |
| std::string_view | scheme () const noexcept |
| std::string | query () const noexcept |
| std::string | fragment () const noexcept |
| std::string | filename () const noexcept |
| std::string | directory () const noexcept |
| std::string | nativeDirectory () const noexcept |
| std::string | extension () const noexcept |
| std::vector< std::string > | pathSegments () const noexcept |
| std::string | path () const noexcept |
| std::string | nativePath () const noexcept |
| std::wstring | nativeWPath () const noexcept |
| bool | isFileScheme () const noexcept |
| bool | isAbsolute () const noexcept |
| bool | isRelative () const noexcept |
| bool | isRootDirectory () const noexcept |
| URL | urlByAppendingPath (URL const &other) const noexcept |
| URL | urlByAppendingPath (std::string_view const other) const noexcept |
| URL | urlByAppendingPath (std::string const &other) const noexcept |
| URL | urlByAppendingPath (char const *other) const noexcept |
| URL | urlByAppendingPath (std::wstring_view const other) const noexcept |
| URL | urlByAppendingPath (std::wstring const &other) const noexcept |
| URL | urlByAppendingPath (wchar_t const *other) const noexcept |
| URL | urlByAppendingExtension (std::string_view other) const noexcept |
| URL | urlByAppendingExtension (std::string const &other) const noexcept |
| URL | urlByAppendingExtension (char const *other) const noexcept |
| URL | urlByRemovingFilename () const noexcept |
| std::unique_ptr< resource_view > | loadView () const |
| Load a resource. | |
| std::vector< URL > | urlsByScanningWithGlobPattern () const noexcept |
Static Public Member Functions | |
| static URL | urlFromPath (std::string_view const path) noexcept |
| static URL | urlFromWPath (std::wstring_view const path) noexcept |
| static void | setUrlForCurrentWorkingDirectory (URL url) noexcept |
| static URL | urlFromCurrentWorkingDirectory () noexcept |
| static URL | urlFromResourceDirectory () noexcept |
| static URL | urlFromExecutableDirectory () noexcept |
| static URL | urlFromExecutableFile () noexcept |
| static URL | urlFromApplicationDataDirectory () noexcept |
| static URL | urlFromApplicationLogDirectory () noexcept |
| static URL | urlFromSystemfontDirectory () noexcept |
| static URL | urlFromApplicationPreferencesFile () noexcept |
| static std::vector< std::string > | filenamesByScanningDirectory (std::string_view path) noexcept |
| static std::string | nativePathFromPath (std::string_view path) noexcept |
| static std::wstring | nativeWPathFromPath (std::string_view path) noexcept |
Friends | |
| bool | operator== (URL const &lhs, URL const &rhs) noexcept |
| auto | operator<=> (URL const &lhs, URL const &rhs) noexcept |
| URL | operator/ (URL const &lhs, URL const &rhs) noexcept |
| URL | operator/ (URL const &lhs, std::string_view const &rhs) noexcept |
| std::string const & | to_string (URL const &url) noexcept |
| std::ostream & | operator<< (std::ostream &lhs, const URL &rhs) |
Universal Resource Locator.
An instance internally holds a string to an url. This will have the following effects:
Constructors and path manipulations will cause the url to be normalized:
'file:' scheme urls can handle the following:
The url instance may be relative itself; meaning it does not hold a scheme. This is important, because it means that any string passed to the constructor is a valid url. This also means that non of the constructors and non of the methods will ever cause an error.
meaningless-urls could still cause meaningless results when converted to a path. But this is no different from having a meaningless path in the first place.
|
staticnoexcept |
Return file names in the directory pointed by the url.
| path | path to the directory to scan. |
| std::unique_ptr< resource_view > v1::URL::loadView | ( | ) | const |
Load a resource.
|
noexcept |
Return new URLs by finding matching files. Currently only works for file: scheme urls.
The following wildcards are supported: