vibe.d beta banner
get vibe.d
0.10.1

Asynchronous I/O that doesn’t get in your way, written in D

Struct URL

Represents a URL decomposed into its components.

struct URL ;

Constructors

NameDescription
this (schema, host, port, path) Constructs a new URL object from its components.
this (path) Constructs a "file:" URL from a native file system path.
this (url_string) Constructs a URL from its string representation.

Properties

NameTypeDescription
anchor[get] stringThe anchor part of the URL (optional)
host[get, set] stringThe host part of the URL (depends on the schema)
localURI[get, set] stringThe path part plus query string and anchor
parentURL[get] URLThe URL to the parent path with query string and anchor stripped.
password[get, set] stringThe password part of the URL (optional)
path[get, set] GenericPath!(vibe.core.path.InetPathFormat)The path part of the URL
pathString[get] stringThe url encoded path part of the URL
pathString[set] stringSet the path part of the URL. It should be properly encoded.
port[get, set] ushortThe port part of the URL (optional)
queryString[get, set] stringThe query string part of the URL (optional)
schema[get, set] stringThe schema/protocol part of the URL
username[get, set] stringThe user name part of the URL (optional)

Methods

NameDescription
defaultPort (schema) Get the default port for the given schema or 0
fromString (url_string) Constructs a URL from its string representation.
normalize (isDirectory) Normalize the content of this URL in place
normalized () Returns the normalized form of the URL.
opBinary (rhs)
opBinary (rhs)
opCmp (rhs)
opEquals (rhs) Tests two URLs for equality using '=='.
opOpAssign (rhs)
opOpAssign (rhs)
parse (url_string) Constructs a URL from its string representation.
startsWith (rhs)
toNativePath () Converts a "file" URL back to a native file system path.
toString () Converts this URL object to its string representation.
Authors

Sönke Ludwig

Copyright

© 2012-2017 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.