PixelLightAPI
.
|
Contains a path or URL (Uniform Resource Locator) More...
#include <Url.h>
Public Member Functions | |
Url () | |
Constructor. | |
Url (const Url &cUrl) | |
Copy constructor. | |
Url (const String &sUrl) | |
Constructor. | |
~Url () | |
Destructor. | |
Url & | operator= (const Url &cUrl) |
Copy an URL. | |
Url & | operator= (const String &sUrl) |
Copy an URL (passed as a string) | |
Url | operator+ (const Url &cUrl) const |
Concatenate an URL. | |
Url & | operator+= (const Url &cUrl) |
Concatenate an URL. | |
String | GetUrl () const |
Get value in URL notation. | |
String | GetNativePath () const |
Get value in native notation. | |
String | GetWindowsPath () const |
Get value in Windows notation. | |
String | GetUnixPath () const |
Get value in Unix notation. | |
bool | IsValid () const |
Returns if the URL is valid. | |
bool | IsValidNativePath () const |
Check if the URL is a valid native file path. | |
bool | IsValidWindowsPath () const |
Check if the URL is valid as a Windows file path. | |
bool | IsValidUnixPath () const |
Check if the URL is valid as a Unix file path. | |
bool | IsEmpty () const |
Returns if the URL is empty. | |
bool | IsAbsolute () const |
Returns if the URL is absolute. | |
bool | IsRelative () const |
Returns if the URL is relative. | |
bool | IsDirectory () const |
Returns if the URL targets a directory. | |
String | GetProtocol () const |
Returns the protocol part. | |
String | GetRoot () const |
Returns the root part. | |
String | GetPath () const |
Returns the path (without root and filename) | |
String | GetFilename () const |
Returns the filename (including it's extension) | |
String | CutFilename () const |
Returns the path without the filename. | |
String | GetTitle () const |
Returns the filename without it's complete extension (one may also call the result "basename) | |
String | GetCompleteTitle () const |
Returns the filename without it's extension (one may also call the result "basename) | |
String | GetExtension () const |
Returns the file extension (aka "suffix") | |
String | CutExtension () const |
Returns the path and filename without extension. | |
String | GetCompleteExtension () const |
Returns the complete file extension (aka "suffix") | |
String | CutCompleteExtension () const |
Returns the path and filename without complete extension. | |
String | GetFirstPath (uint32 &nPathPos) const |
Returns the first part of the path. | |
String | GetFirstPath () const |
Returns the first part of the path. | |
PLCORE_API String | GetNextPath (uint32 &nPathPos) const |
Returns the next part of the path. | |
PLCORE_API Url & | Collapse () |
Collapses the URL. |
Contains a path or URL (Uniform Resource Locator)
PLCore::Url::Url | ( | ) | [inline] |
PLCore::Url::Url | ( | const Url & | cUrl | ) | [inline] |
Copy constructor.
[in] | cUrl | URL to copy |
PLCore::Url::Url | ( | const String & | sUrl | ) | [inline] |
[in] | sUrl | URL as string |
PLCore::Url::~Url | ( | ) | [inline] |
Destructor.
Copy an URL.
[in] | cUrl | URL to copy |
Copy an URL (passed as a string)
[in] | sUrl | String containing URL to copy |
Concatenate an URL.
[in] | cUrl | URL to add |
Concatenate an URL.
[in] | cUrl | URL to add |
String PLCore::Url::GetUrl | ( | ) | const [inline] |
Get value in URL notation.
String PLCore::Url::GetNativePath | ( | ) | const [inline] |
Get value in native notation.
String PLCore::Url::GetWindowsPath | ( | ) | const [inline] |
Get value in Windows notation.
String PLCore::Url::GetUnixPath | ( | ) | const [inline] |
Get value in Unix notation.
bool PLCore::Url::IsValid | ( | ) | const [inline] |
Returns if the URL is valid.
bool PLCore::Url::IsValidNativePath | ( | ) | const [inline] |
Check if the URL is a valid native file path.
bool PLCore::Url::IsValidWindowsPath | ( | ) | const [inline] |
Check if the URL is valid as a Windows file path.
bool PLCore::Url::IsValidUnixPath | ( | ) | const [inline] |
Check if the URL is valid as a Unix file path.
bool PLCore::Url::IsEmpty | ( | ) | const [inline] |
Returns if the URL is empty.
bool PLCore::Url::IsAbsolute | ( | ) | const [inline] |
Returns if the URL is absolute.
bool PLCore::Url::IsRelative | ( | ) | const [inline] |
Returns if the URL is relative.
bool PLCore::Url::IsDirectory | ( | ) | const [inline] |
Returns if the URL targets a directory.
String PLCore::Url::GetProtocol | ( | ) | const [inline] |
Returns the protocol part.
String PLCore::Url::GetRoot | ( | ) | const [inline] |
Returns the root part.
String PLCore::Url::GetPath | ( | ) | const [inline] |
Returns the path (without root and filename)
String PLCore::Url::GetFilename | ( | ) | const [inline] |
Returns the filename (including it's extension)
String PLCore::Url::CutFilename | ( | ) | const [inline] |
Returns the path without the filename.
String PLCore::Url::GetTitle | ( | ) | const [inline] |
Returns the filename without it's complete extension (one may also call the result "basename)
* Example showing the difference between "GetTitle()", "GetCompleteTitle()", "GetExtension()", "CutExtension()", "GetCompleteExtension()" and "CutCompleteExtension()": * Url cUrl("C:\\Programs\\App\\archive.tar.gz"); * String sTitle = cUrl.GetTitle(); // Result is "archive" * String sCompleteTitle = cUrl.GetCompleteTitle(); // Result is "archive.tar" * String sExtension = cUrl.GetExtension(); // Result is "gz" * String sCutExtension = cUrl.CutExtension(); // Result is "C:\Programs\App\archive.tar" * String sCompleteExtension = cUrl.GetCompleteExtension(); // Result is "tar.gz" * String sCutCompleteExtension = cUrl.CutCompleteExtension(); // Result is "C:\Programs\App\archive" *
String PLCore::Url::GetCompleteTitle | ( | ) | const [inline] |
Returns the filename without it's extension (one may also call the result "basename)
String PLCore::Url::GetExtension | ( | ) | const [inline] |
Returns the file extension (aka "suffix")
String PLCore::Url::CutExtension | ( | ) | const [inline] |
Returns the path and filename without extension.
String PLCore::Url::GetCompleteExtension | ( | ) | const [inline] |
Returns the complete file extension (aka "suffix")
String PLCore::Url::CutCompleteExtension | ( | ) | const [inline] |
Returns the path and filename without complete extension.
String PLCore::Url::GetFirstPath | ( | uint32 & | nPathPos | ) | const [inline] |
Returns the first part of the path.
[out] | nPathPos | Will receive the new position within the path |
String PLCore::Url::GetFirstPath | ( | ) | const [inline] |
Returns the first part of the path.
PLCORE_API String PLCore::Url::GetNextPath | ( | uint32 & | nPathPos | ) | const |
Returns the next part of the path.
[in,out] | nPathPos | Position within the path |
PLCORE_API Url& PLCore::Url::Collapse | ( | ) |
Collapses the URL.
|