#include <FUUri.h>
Public Types | |
enum | Scheme { NONE, FILE, FTP, HTTP, HTTPS } |
Public Member Functions | |
FUUri () | |
Constructor. | |
FUUri (const fstring &uri, bool escape=false) | |
Constructor. | |
FUUri (Scheme scheme, const fstring &username, const fstring &passwd, const fstring &host, uint32 port, const fstring &path=FC(""), const fstring &query=FC(""), const fstring &fragment=FC("")) | |
Constructor. | |
FUUri (Scheme scheme, const fstring &host, const fstring &path=FC(""), const fstring &fragment=FC("")) | |
Constructor. | |
FUUri (const fstring &path, const fstring &fragment) | |
Constructor. | |
Scheme | GetScheme () const |
Retrieves the scheme from the URI. | |
const fstring & | GetSchemeDelimiter () const |
Retrieves the scheme delimiter from the URI. | |
fstring | GetUserInformations () const |
Retrieves the user information from the URI. | |
const fstring & | GetHostname () const |
Retrieves the host information from the URI. | |
uint32 | GetPort () const |
Retrieves the port number from the URI. | |
void | SetPort (uint32 _port) |
Sets the port number of the URI. | |
const fstring & | GetPath () const |
Retrieves the path from the URI. | |
const fstring & | GetQuery () const |
Retrieves the query from the URI. | |
void | SetQuery (const fstring &_query) |
Sets the query of the URI. | |
const fstring & | GetFragment () const |
Retrieves the fragment from the URI. | |
void | SetFragment (const fstring &_fragment) |
Sets the fragment of the URI. | |
fstring | GetAuthority () const |
Retrieves the authority string from the URI. | |
fstring | GetAbsolutePath () const |
Retrieves an absolute path from the URI. | |
fstring | GetAbsoluteUri (bool fragment=true) const |
Retrieves an absolute URI string from the URI. | |
fstring | GetRelativeUri (const FUUri &uri) const |
Retrieves an relative URI string from the URI. | |
fstring | MakeRelative (const fstring &path) const |
Makes a relative path from a uri. | |
fstring | MakeAbsolute (const fstring &relativePath) const |
Makes an absolute path from a relative path and this URI. | |
void | MakeAbsolute (FUUri &uri) const |
Makes the passed in URI relative to this URI. | |
FUUri | Resolve (const fstring &relativePath) const |
Resolves a URI from a relative path against this URI. | |
bool | IsFile () const |
Retrieves whether this URI points to a file. | |
Static Public Member Functions | |
static fstring | Escape (const fstring &path) |
Escapes a path. |
This structure is quite incomplete but covers all the necessary cases for now. Possible upgrades to support all five parts: SCHEME://HOSTNAME/FILENAME@ARGUMENTS#DAE_ID
[scheme:][schemeDelimiter][userInfo@][host][:port][/path][?query][fragment]
Right now, SCHEME must always be "file://". HOSTNAME, on Windows, can be a UNC computer name. No other hostname types are supported. ARGUMENTS are not supported.
|
Constructor.
|
|
Constructor.
|
|
Constructor.
|
|
Constructor.
|
|
Escapes a path.
|
|
Retrieves an absolute path from the URI.
|
|
Retrieves an absolute URI string from the URI.
|
|
Retrieves the authority string from the URI. ("[userInfo@]host[:port]")
|
|
Retrieves the fragment from the URI.
|
|
Retrieves the host information from the URI.
|
|
Retrieves the path from the URI.
|
|
Retrieves the port number from the URI.
|
|
Retrieves the query from the URI.
|
|
Retrieves an relative URI string from the URI.
|
|
Retrieves the scheme from the URI.
|
|
Retrieves the scheme delimiter from the URI.
|
|
Retrieves the user information from the URI.
|
|
Retrieves whether this URI points to a file.
|
|
Makes the passed in URI relative to this URI.
|
|
Makes an absolute path from a relative path and this URI.
|
|
Makes a relative path from a uri.
|
|
Resolves a URI from a relative path against this URI.
|
|
Sets the fragment of the URI.
|
|
Sets the port number of the URI.
|
|
Sets the query of the URI.
|