![]() |
Kodi Documentation 18.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 | 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 () |
The current offset in an open file. More... | |
int64_t | GetLength () |
Get the file size of an open file. More... | |
bool | AtEnd () |
Checks the file access is on end position. More... | |
void | Close () |
Close an open file. More... | |
int | GetChunkSize () |
Get the chunk size for an open file. 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 () |
Get the current download speed of file if loaded from web. More... | |