Other globally available functions
Used to perform typical operations with it.
|
inline |
Retrieve MD5sum of a file.
| [in] | path | Path to the file to MD5sum |
Example:
|
inline |
Returns a thumb cache filename.
| [in] | filename | Path to file |
Example:
|
inline |
Make filename valid.
Function to replace not valid characters with '_'. It can be also compared with original before in a own loop until it is equal (no invalid characters).
| [in] | filename | Filename to check and fix |
Example:
|
inline |
Make directory name valid.
Function to replace not valid characters with '_'. It can be also compared with original before in a own loop until it is equal (no invalid characters).
| [in] | path | Directory name to check and fix |
Example:
|
inline |
Returns the translated path.
| [in] | source | String or unicode - Path to format |
Example:
or
|
inline |
Retrieves information about the amount of space that is available on a disk volume.
Path can be also with Kodi's special protocol.
| [in] | path | Path for where to check |
| [out] | capacity | The total number of bytes in the file system |
| [out] | free | The total number of free bytes in the file system |
| [out] | available | The total number of free bytes available to a non-privileged process |
Example:
|
inline |
Return the file name from given complate path string.
| [in] | path | The complete path include file and directory |
Example:
|
inline |
Return the directory name from given complate path string.
| [in] | path | The complete path include file and directory |
Example:
|
inline |
Remove the slash on given path name.
| [in,out] | path | The complete path |
Example:
|
inline |
Return a size aligned to the chunk size at least as large as the chunk size.
| [in] | chunk | The chunk size |
| [in] | minimum | The minimum size (or maybe the minimum number of chunks?) |
|
inline |
Checks the given path contains a known internet protocol.
About following protocols are the path checked:
| Protocol | Return true condition | Protocol | Return true condition |
|---|---|---|---|
| dav | strictCheck = true | rtmps | always |
| davs | strictCheck = true | rtmpt | always |
| ftp | strictCheck = true | rtmpte | always |
| ftps | strictCheck = true | rtp | always |
| http | always | rtsp | always |
| https | always | sdp | always |
| mms | always | sftp | strictCheck = true |
| mmsh | always | stack | always |
| mmst | always | tcp | always |
| rtmp | always | udp | always |
| rtmpe | always |
| [in] | path | To checked path/URL |
| [in] | strictCheck | [opt] If True the set of protocols used will be extended to include ftp, ftps, dav, davs and sftp. |
Example:
|
inline |
Checks whether the specified path refers to a local network.
In difference to IsHostOnLAN() include this more deeper checks where also handle Kodi's special protocol and stacks.
| [in] | path | To checked path |
Example:
|
inline |
Checks specified path for external network.
| [in] | path | To checked path |
Example:
|
inline |
Checks whether the given path refers to the own system.
| [in] | path | To checked path |
|
inline |
Checks specified path is a regular URL, e.g. "someprotocol://path/to/file".
Example:
|
inline |
To get HTTP header information.
| [in] | url | URL source of the data |
| [out] | header | The class HttpHeader |
The following table contains values that can be get with class HttpHeader :
| Description | Type | Get call |
|---|---|---|
| Get the value associated with this parameter of these HTTP headers | std::string | GetValue |
| Get the values as list associated with this parameter of these HTTP headers | std::vector<std::string> | GetValues |
| Get the full header string associated with these HTTP headers | std::string | GetHeader |
| Get the mime type associated with these HTTP headers | std::string | GetMimeType |
| Get the charset associated with these HTTP headers | std::string | GetCharset |
| The protocol line associated with these HTTP headers | std::string | GetProtoLine |
Example:
|
inline |
Get file mime type.
| [in] | url | URL source of the data |
| [out] | mimeType | the mime type of the URL |
| [in] | useragent | to be used when retrieving the MimeType [opt] |
Example:
|
inline |
Get file content-type.
| [in] | url | URL source of the data |
| [out] | content | The returned type |
| [in] | useragent | to be used when retrieving the MimeType [opt] |
Example:
|
inline |
Get cookies stored by CURL in RFC 2109 format.
| [in] | url | URL source of the data |
| [out] | cookies | The text list of available cookies |
Example: