#include <rurl.h>
|
enum | Type { File,
Directory,
Auto
} |
|
void | correct () |
|
Relative name of file or directory to some base location.
Definition at line 91 of file rurl.h.
◆ URL() [1/2]
Relative::URL::URL |
( |
KURL |
base, |
|
|
KURL |
url, |
|
|
Type |
type = Auto |
|
) |
| |
Evaluates the relative path between url and base and creates RURL object.
base should be an url to the directory or location, not a file. The check is not performed. url should be the usual url. Only the path of this url is taken into account when evaluating relative path.
Definition at line 235 of file rurl.cpp.
◆ URL() [2/2]
Relative::URL::URL |
( |
KURL |
base, |
|
|
TQString |
url, |
|
|
bool |
isUrlRelative, |
|
|
Type |
type = Auto |
|
) |
| |
Creates RURL object with given base and relative or full url (according to the isUrlRelative value).
Definition at line 240 of file rurl.cpp.
◆ base()
KURL Relative::URL::base |
( |
| ) |
const |
Returns RURL base.
Definition at line 257 of file rurl.cpp.
◆ basePath()
TQString Relative::URL::basePath |
( |
| ) |
const |
Returns a path of a base KURL (using KURL::path()).
Trailing slash is guaranteed.
Definition at line 262 of file rurl.cpp.
◆ relativeTo()
URL Relative::URL::relativeTo |
( |
KURL |
base | ) |
|
Returns a new URL that is relative to given base.
Relative part is taken from current URL object.
Definition at line 296 of file rurl.cpp.
◆ relativeURL() [1/2]
URL Relative::URL::relativeURL |
( |
KURL |
base, |
|
|
KURL |
url |
|
) |
| |
|
static |
Returns a new relative URL constructed from base and given url.
Definition at line 301 of file rurl.cpp.
◆ relativeURL() [2/2]
URL Relative::URL::relativeURL |
( |
KURL |
base, |
|
|
TQString |
url, |
|
|
bool |
isUrlRelative |
|
) |
| |
|
static |
Returns a new relative URL constructed from base and given url.
url parameter is either relative or full (depends on isUrlRelative value).
Definition at line 306 of file rurl.cpp.
◆ setBase() [1/2]
void Relative::URL::setBase |
( |
const KURL & |
base | ) |
|
Sets a new base for a RURL.
Definition at line 245 of file rurl.cpp.
◆ setBase() [2/2]
void Relative::URL::setBase |
( |
const TQString & |
base | ) |
|
Sets a new base for a RURL.
Base is is considered to be a directory and converted to KURL using KURL::setPath().
Definition at line 250 of file rurl.cpp.
◆ url()
KURL Relative::URL::url |
( |
| ) |
const |
Returns a complete url to the RURL location.
This is basically base + rurl. This also resolves ".." components in path. Directories always have trailing slash in KURL (this means that if url() == "file:/test/dir/" then url() != KURL("/test/dir") and url() == KURL("/test/dir/").
Definition at line 267 of file rurl.cpp.
◆ urlDirectory()
TQString Relative::URL::urlDirectory |
( |
| ) |
const |
Returns a directory of a complete url to the location.
The url is constructed as base + rurl. Returns the same as urlPath() for directories. This method uses KURL::directory to determine the directory. Trailing slash is guaranteed. This also resolves ".." components in path.
Definition at line 288 of file rurl.cpp.
◆ urlPath()
TQString Relative::URL::urlPath |
( |
| ) |
const |
Returns a path of a complete url to the location.
The url is basically base + rurl. This method only returns a path part of the KURL (using KURL::path()). Trailing slash is guaranteed for directories and no trailing slash - for files. This also resolves ".." components in path.
Definition at line 275 of file rurl.cpp.
The documentation for this class was generated from the following files: