Represents a path to a file with a protocol. e.g. http://www.site.com/aFile.png The path may also be relative to some other path (aFile.png relative to http://www.site.com).
Public Member Functions | |
Location (string url) | |
Creates a new filepath from the given url. More... | |
Location (string url, Location relativeTo) | |
Creates a new filepath from the given url. More... | |
void | reload () |
Reloads the current URL. More... | |
void | assign (string url) |
Assign (go to) the given URL. More... | |
void | assign (string url, bool addHistory) |
Assign (go to) the given URL. More... | |
void | replace (string url) |
Replaces the current URL with the given one. The same as assign in PowerUI. More... | |
override string | ToString () |
Gets the full path as a string. More... | |
FileProtocol | GetProtocol () |
Gets the file protocol for this location. Default is resources://. More... | |
Static Public Member Functions | |
static void | LoadUrlString (string getString, Dictionary< string, string > set) |
Loads a set of parameters from a typical URL formatted string. E.g. hello=1&hi=2. Loads into the given set - it will overwrite any existing values. More... | |
static string | ToPunycode (string host) |
Converts a host to punycode. More... | |
static string | FromPunycode (string host) |
Converts punycode back to unicode. More... | |
Public Attributes | |
string | RawUrl |
The raw Url/Path More... | |
string | Protocol |
The protocol to use when accessing this file. More... | |
string[] | Segments |
The pieces of the path split up by /. More... | |
string | RelativeTo |
The raw Url that this path is relative to. More... | |
string | Hash |
The hash section of the URL, if there is one. Separated here because it should not be sent to the server. More... | |
Document | document |
The parent document that this location is used by, if any. More... | |
string | Query |
The ?queryString if there is one. More... | |
string | authorization |
Auth string alongside the hostname. 'user:pass' More... | |
Properties | |
bool | hasHostname [get] |
True if this path has a hostname. More... | |
string | absoluteNoHash [get] |
This path as its resolved absolute form, without the hash (if there is one). More... | |
string | absolute [get] |
This path as its resolved absolute form, including the hash. More... | |
string[] | authParts [get] |
The authorization string split by colon. More... | |
string | username [get, set] |
Username. More... | |
string | password [get, set] |
Password. More... | |
string | Filename [get] |
Gets the filename without the filetype. More... | |
string | File [get, set] |
Gets the full filename with the type included. More... | |
string | Filetype [get] |
Gets the type of file this path points to. More... | |
string | Directory [get] |
Gets the full directory path this file is in. More... | |
string | Path [get] |
Gets the url of this file without the protocol. More... | |
string | host [get, set] |
The host name of this path. More... | |
string | hostname [get, set] |
The hostname with no port number. More... | |
string | port [get, set] |
The port number, if there is one. More... | |
string | href [get, set] |
The path, as it was declared. More... | |
string | origin [get] |
The hostname combined with the protocol. More... | |
string | protocol [get, set] |
This locations protocol, including the trailing colon (":"). More... | |
string | hash [get, set] |
The hash section of the URL, if there is one. More... | |
string | pathname [get, set] |
Gets everything between host and the search string. More... | |
string | file [get] |
The file without a query string. More... | |
Dictionary< string, string > | searchParams [get] |
The search parameters in a parsed set. More... | |
string | relative [get] |
This location relative to host. More... | |
string | search [get, set] |
Gets the query string, if there is one. More... | |
bool | web [get] |
Is this a web location? More... | |
static System.Globalization.IdnMapping | PunyMapper [get] |
Used to map punycode domains. More... | |
FileProtocol | Handler [get] |
The protocol which will handle this URL. More... | |
HtmlDocument | htmlDocument [get] |
The HTML document that this path belongs to, if any. More... | |
bool | fullAccess [get] |
Does this location have full access to the game? Depends on the protocol. E.g. http does not. More... | |
PowerUI.Http.CookieJar | CookieJar [get] |
Gets the cookie jar for this path. More... | |
Private Member Functions | |
void | SetPath (string url, Location relativeTo) |
Applies the given url to this filepath object. More... | |
Static Private Attributes | |
static string[] | Colon =new string[]{":"} |
A colon for splitting. More... | |
static System.Globalization.IdnMapping | PunyMapper_ |
Used to map punycode domains. More... | |
|
inline |
Creates a new filepath from the given url.
url | The url of the file. |
|
inline |
Creates a new filepath from the given url.
url | The url of the file. |
relativeTo | The path that url is relative to. |
|
inline |
Assign (go to) the given URL.
|
inline |
Assign (go to) the given URL.
|
inlinestatic |
Converts punycode back to unicode.
|
inline |
Gets the file protocol for this location. Default is resources://.
|
inlinestatic |
Loads a set of parameters from a typical URL formatted string. E.g. hello=1&hi=2. Loads into the given set - it will overwrite any existing values.
|
inline |
Reloads the current URL.
|
inline |
Replaces the current URL with the given one. The same as assign in PowerUI.
|
inlineprivate |
Applies the given url to this filepath object.
url | The url of the file. |
relativeTo | The path that url is relative to, or null if none. |
|
inlinestatic |
Converts a host to punycode.
|
inline |
Gets the full path as a string.
string Dom.Location.authorization |
Auth string alongside the hostname. 'user:pass'
|
staticprivate |
A colon for splitting.
Document Dom.Location.document |
The parent document that this location is used by, if any.
string Dom.Location.Hash |
The hash section of the URL, if there is one. Separated here because it should not be sent to the server.
string Dom.Location.Protocol |
The protocol to use when accessing this file.
|
staticprivate |
Used to map punycode domains.
string Dom.Location.Query |
The ?queryString if there is one.
string Dom.Location.RawUrl |
The raw Url/Path
string Dom.Location.RelativeTo |
The raw Url that this path is relative to.
string [] Dom.Location.Segments |
The pieces of the path split up by /.
|
get |
This path as its resolved absolute form, including the hash.
|
get |
This path as its resolved absolute form, without the hash (if there is one).
|
getprivate |
The authorization string split by colon.
|
get |
Gets the cookie jar for this path.
|
get |
Gets the full directory path this file is in.
|
getset |
Gets the full filename with the type included.
|
get |
The file without a query string.
|
get |
Gets the filename without the filetype.
|
get |
Gets the type of file this path points to.
|
get |
Does this location have full access to the game? Depends on the protocol. E.g. http does not.
|
get |
The protocol which will handle this URL.
|
getset |
The hash section of the URL, if there is one.
|
get |
True if this path has a hostname.
|
getset |
The host name of this path.
|
getset |
The hostname with no port number.
|
getset |
The path, as it was declared.
|
get |
The HTML document that this path belongs to, if any.
|
get |
The hostname combined with the protocol.
|
getset |
Password.
|
get |
Gets the url of this file without the protocol.
|
getset |
Gets everything between host and the search string.
|
getset |
The port number, if there is one.
|
getset |
This locations protocol, including the trailing colon (":").
|
staticget |
Used to map punycode domains.
|
get |
This location relative to host.
|
getset |
Gets the query string, if there is one.
|
get |
The search parameters in a parsed set.
|
getset |
Username.
|
get |
Is this a web location?