system.uri - Palamecia/mint GitHub Wiki
Module
load system.uri
This module provides tools to works with Uniform Resource Identifiers (URI).
Packages
Classes
System.Url
This class manage an Uniform Resource Locator.
Members
Modifiers | Member | Description |
---|---|---|
- class |
Parser | This class provides a parser to extract informations from an URL string. |
- @ const |
ReDriveLetterPath | |
+ @ const |
escapeString | Returns the content of str with special characters escaped to be inserted i... |
- final |
fragment | |
+ @ const |
fromFilePath | Creates a new URL for a local file path. |
+ const |
getFragment | Returns the fragment of the URL if it is defined; otherwise none is returned. |
+ const |
getHost | Returns the host of the URL if it is defined; otherwise none is returned. |
+ const |
getParams | Returns the parameters of the URL. |
+ const |
getPassword | Returns the password of the URL if it is defined; otherwise none is returned. |
+ const |
getPath | Returns the path of the URL. |
+ const |
getPort | Returns the port of the URL if it is defined; otherwise none is returned. |
+ const |
getQuery | Returns the query string of the URL if it is defined; otherwise none is ret... |
+ const |
getScheme | Returns the scheme part of the URL. |
+ const |
getUserName | Returns the user name of the URL if it is defined; otherwise none is return... |
- final |
host | |
+ const |
isLocalFile | Returns true if this URL is pointing to a local file path; otherwise return... |
+ const |
new | Creates a new URL for the ressource identified by url . If url is an insta... |
- final |
params | |
- final |
password | |
- final |
path | |
- final |
port | |
- final |
query | |
- final |
scheme | |
+ const |
setPath | Sets the path of the URL to path . |
+ const |
setScheme | Sets the scheme part of the URL to scheme . |
+ const |
toFile | Returns the ressource identified by the URL as an instance of System.File or ... |
+ const |
toString | Returns a string representation of the URL. |
+ @ const |
unescapeString | Returns the content of str with special characters unescaped to be extracte... |
- final |
user |
System.Url.Parser
This class provides a parser to extract informations from an URL string.
Members
Modifiers | Member | Description |
---|---|---|
- @ const |
ReNetloc | |
- @ const |
ReUrl | |
+ final |
fragment | |
+ final |
host | |
+ final |
params | |
+ const |
parse | Setups the object properties using the URL string given by url . Returns t ... |
+ const |
parsePath | |
+ const |
parseQuery | |
+ final |
password | |
+ final |
path | |
+ final |
port | |
+ final |
query | |
+ final |
scheme | |
+ @ const |
unescapeString | Returns the content of str with escape sequences replaced by the correspond... |
+ final |
user |
System.Urn
This class manage an Uniform Resource Name.
Members
Modifiers | Member | Description |
---|
Descriptions
System.Url.Parser.ReNetloc
/^(?:([a-zA-Z0-9\+\-\.]*)(?::([a-zA-Z0-9\+\-\.]*))?@)?([a-zA-Z0-9\+\-\.]*)(?::([a-zA-Z0-9\+\-\.]*))?$/
System.Url.Parser.ReUrl
/^(?:([a-zA-Z][a-zA-Z0-9\+\-\.]*):(?:\/\/)?)?([a-zA-Z0-9\+\-\.%_~!\$&'\(\)\*,;=:@\/]+)(?:\?([a-zA-Z0-9\+\-\.%_~!\$&'\(\)\*,;=:@\/\?]+))?(?:#([a-zA-Z0-9\+\-\.%_~!\$&'\(\)\*,;=:@\/\?]+))?$/
System.Url.Parser.fragment
none
System.Url.Parser.host
none
System.Url.Parser.params
none
System.Url.Parser.parse
def (self, url)
Setups the object properties using the URL string given by url
.
Returns true
on success; otherwise returns false
.
System.Url.Parser.parsePath
def (self, path)
System.Url.Parser.parseQuery
def (self, query)
System.Url.Parser.password
none
System.Url.Parser.path
none
System.Url.Parser.port
none
System.Url.Parser.query
none
System.Url.Parser.scheme
none
System.Url.Parser.unescapeString
def (str)
Returns the content of str
with escape sequences replaced by the
corresponding character.
System.Url.Parser.user
none
System.Url.ReDriveLetterPath
/^\/[a-zA-Z]:/
System.Url.escapeString
def (const str)
Returns the content of str
with special characters escaped to be
inserted in an URL string.
System.Url.fragment
none
System.Url.fromFilePath
def (const filePath)
Creates a new URL for a local file path.
System.Url.getFragment
def (const self)
Returns the fragment of the URL if it is defined; otherwise none
is returned.
System.Url.getHost
def (const self)
Returns the host of the URL if it is defined; otherwise none
is
returned.
System.Url.getParams
def (const self)
Returns the parameters of the URL.
System.Url.getPassword
def (const self)
Returns the password of the URL if it is defined; otherwise none
is returned.
System.Url.getPath
def (const self)
Returns the path of the URL.
System.Url.getPort
def (const self)
Returns the port of the URL if it is defined; otherwise none
is
returned.
System.Url.getQuery
def (const self)
Returns the query string of the URL if it is defined; otherwise none
is returned.
System.Url.getScheme
def (const self)
Returns the scheme part of the URL.
System.Url.getUserName
def (const self)
Returns the user name of the URL if it is defined; otherwise none
is returned.
System.Url.host
none
System.Url.isLocalFile
def (const self)
Returns true
if this URL is pointing to a local file path; otherwise
returns false
. A URL is a local file path if the scheme is "file".
System.Url.new
def (self, url)
Creates a new URL for the ressource identified by url
.
If url
is an instance of System.Url, this instance is returned.
If desc
is a string, it is parsed to retrieve the ressource
informations. If the string is not a valid URL, none
is returned.
If desc
provides a toUrl
method, this method is used to create
the returned value; otherwise none
is returned.
System.Url.params
none
System.Url.password
none
System.Url.path
none
System.Url.port
none
System.Url.query
none
System.Url.scheme
none
System.Url.setPath
def (self, path)
Sets the path of the URL to path
.
System.Url.setScheme
def (self, scheme)
Sets the scheme part of the URL to scheme
.
System.Url.toFile
def (const self)
Returns the ressource identified by the URL as an instance of
System.File or none
if this URL is not pointing to a local file.
System.Url.toString
def (const self)
Returns a string representation of the URL.
System.Url.unescapeString
def (const str)
Returns the content of str
with special characters unescaped to be
extracted from an URL string.
System.Url.user
none