|
Kodi Docs 20.0
Kodi is an open source media player and entertainment hub.
|
#include <Filesystem.h>
Public Member Functions | |
| CFile ()=default | |
| Construct a new, unopened file. More... | |
| virtual | ~CFile () |
Close() is called from the destructor, so explicitly closing the file isn't required. More... | |
| bool | OpenFile (const std::string &filename, unsigned int flags=0) |
| Open the file with filename via Kodi's CFile. Needs to be closed by calling Close() when done. More... | |
| bool | OpenFileForWrite (const std::string &filename, bool overwrite=false) |
| Open the file with filename via Kodi's CFile in write mode. Needs to be closed by calling Close() when done. More... | |
| bool | IsOpen () const |
| Check file is opened. More... | |
| void | Close () |
| Close an open file. More... | |
| bool | CURLCreate (const std::string &url) |
| Create a Curl representation. More... | |
| bool | CURLAddOption (CURLOptiontype type, const std::string &name, const std::string &value) |
| Add options to the curl file created with CURLCreate. More... | |
| bool | CURLOpen (unsigned int flags=0) |
| Open the curl file created with CURLCreate. More... | |
| ssize_t | Read (void *ptr, size_t size) |
| Read from an open file. More... | |
| bool | ReadLine (std::string &line) |
| Read a string from an open file. More... | |
| ssize_t | Write (const void *ptr, size_t size) |
| Write to a file opened in write mode. More... | |
| void | Flush () |
| Flush buffered data. More... | |
| int64_t | Seek (int64_t position, int whence=SEEK_SET) |
| Set the file's current position. More... | |
| int | Truncate (int64_t size) |
| Truncate a file to the requested size. More... | |
| int64_t | GetPosition () const |
| The current offset in an open file. More... | |
| int64_t | GetLength () const |
| Get the file size of an open file. More... | |
| bool | AtEnd () const |
| Checks the file access is on end position. More... | |
| int | GetChunkSize () const |
| Get the chunk size for an open file. More... | |
| bool | IoControlGetSeekPossible () const |
| To check seek possible on current stream by file. More... | |
| bool | IoControlGetCacheStatus (CacheStatus &status) const |
| To check a running stream on file for state of his cache. More... | |
| bool | IoControlSetCacheRate (unsigned int rate) |
| Unsigned int with speed limit for caching in bytes per second. More... | |
| bool | IoControlSetRetry (bool retry) |
| Enable/disable retry within the protocol handler (if supported). More... | |
| const std::string | GetPropertyValue (FilePropertyTypes type, const std::string &name) const |
| Retrieve a file property. More... | |
| const std::vector< std::string > | GetPropertyValues (FilePropertyTypes type, const std::string &name) const |
| Retrieve file property values. More... | |
| double | GetFileDownloadSpeed () const |
| Get the current download speed of file if loaded from web. More... | |