URI Parsing routines

The URIParser unit contains a basic type () and some routines for the parsing () and construction () of Uniform Resource Indicators, commonly referred to as URL: Uniform Resource Location. It is used in various other units, and in itself contains no classes. It supports all protocols, username/password/port specification, query parameters and bookmarks etc..

Record containing all possible parts of a URI TURI is the basic record that can be filled by the call. It contains the contents of a URI, parsed out in it's various pieces. Protocol of the URI (http, ftp, file, mailto etc.) Username part of the URI Password part of the URI Hostname part of the URI Port part of the URI Path (directory) part of the URI Document (filename) part of the URI Query parameter part of the URI Bookmark part of the URI Indicates whether an 'Authority' part was present in the URI Form a string representation of the URI EncodeURI will return a valid text representation of the URI in the URI record. The text representation of the URI The URI record to encode Parse a URI and split it into its constituent parts

ParseURI decodes URI and returns the various parts of the URI in the result record.

The function accepts the most general URI scheme:

proto://user:pwd@host:port/path/document?params#bookmark

Missing (optional) parts in the URI will be left blank in the result record. If a default protocol and port are specified, they will be used in the record if the corresponding part is not present in the URI.

Record with the URI split out in parts. URI to decode Default protocol to use if none is specified. Default port to use if none is specified. Return a relative link

ResolveRelativeURI returns in ResultUri an absolute link constructed from a base URI BaseURI and a relative link RelURI. One of the two URI names must have a protocol specified. If the RelURI argument contains a protocol, it is considered a complete (absolute) URI and is returned as the result.

The function returns True if a link was succesfully returned.

If no protocols are specified, the function returns False
True if the operation was succesful, False if not. Base URI URI relative to BaseURI or absolute URI. Resulting absolute URI Convert a URI to a filename URIToFilename returns a filename (using the correct Path Delimiter character) from URI. The URI must be of protocol File or have no protocol. If the URI contains an unsupported protocol, False is returned. True if a filename was extracted from the URI URI to analyse Resulting filename Construct a URI from a filename FilenameToURI takes Filename and constructs a file: protocol URI from it. None. file: protocol URI Filename to construct URI from Check whether a URI is absolute. IsAbsoluteURI returns True if the URI in UriReference is absolute, i.e. contains a protocol part. None. True if UriReference is absolute. URI to analyse