![]() |
Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
Wrapper equipping a CVFSEntry with an IFile interface. More...
#include <VFSEntry.h>
Public Member Functions | |
CVFSEntryIFileWrapper (VFSEntryPtr ptr) | |
The constructor initializes the reference to the wrapped CVFSEntry. | |
~CVFSEntryIFileWrapper () override | |
Empty destructor. | |
bool | Open (const CURL &url) override |
Open a file. | |
bool | OpenForWrite (const CURL &url, bool bOverWrite) override |
Open a file for writing. | |
bool | Exists (const CURL &url) override |
Check for file existence. | |
int | Stat (const CURL &url, struct __stat64 *buffer) override |
Stat a file. | |
ssize_t | Read (void *lpBuf, size_t uiBufSize) override |
Read data from file: | |
ssize_t | Write (const void *lpBuf, size_t uiBufSize) override |
Write data to file. | |
int64_t | Seek (int64_t iFilePosition, int whence=SEEK_SET) override |
Seek in file. | |
int | Truncate (int64_t size) override |
Truncate a file. | |
void | Close () override |
Close file. | |
int64_t | GetPosition () override |
Obtain current file position. | |
int64_t | GetLength () override |
Obtain file size. | |
int | GetChunkSize () override |
Obtain chunksize of file. | |
int | IoControl (XFILE::IOControl request, void *param) override |
Perform I/O controls for file. | |
bool | Delete (const CURL &url) override |
Delete a file. | |
bool | Rename (const CURL &url, const CURL &url2) override |
Rename a file. | |
![]() | |
IFile () | |
virtual | ~IFile () |
virtual bool | ReOpen (const CURL &url) |
virtual int | Stat (struct __stat64 *buffer) |
virtual ReadLineResult | ReadLine (char *buffer, std::size_t bufferSize) |
virtual void | Flush () |
virtual double | GetDownloadSpeed () |
virtual bool | SetHidden (const CURL &url, bool hidden) |
virtual const std::string | GetProperty (XFILE::FileProperty type, const std::string &name="") const |
virtual const std::vector< std::string > | GetPropertyValues (XFILE::FileProperty type, const std::string &name="") const |
Wrapper equipping a CVFSEntry with an IFile interface.
Needed as CVFSEntry implements several VFS interfaces with overlapping methods.
|
explicit |
|
override |
Empty destructor.
|
overridevirtual |
Close file.
Implements XFILE::IFile.
|
overridevirtual |
Obtain chunksize of file.
Reimplemented from XFILE::IFile.
|
overridevirtual |
Obtain file size.
Implements XFILE::IFile.
|
overridevirtual |
Obtain current file position.
Implements XFILE::IFile.
|
overridevirtual |
Perform I/O controls for file.
Reimplemented from XFILE::IFile.
Open a file.
[in] | url | URL to open. |
Implements XFILE::IFile.
|
overridevirtual |
Open a file for writing.
[in] | url | URL to open. |
[in] | bOverWrite | If true, overwrite an existing file. |
Reimplemented from XFILE::IFile.
Read data from file:
lpBuf | Buffer to read data into. | |
[in] | uiBufSize | Number of bytes to read. |
Implements XFILE::IFile.
Rename a file.
[in] | url | URL of file to rename. |
[in] | url2 | New URL of file. |
Reimplemented from XFILE::IFile.
|
overridevirtual |
Seek in file.
[in] | iFilePosition | Position to seek to. |
[in] | whence | Origin for position. |
Implements XFILE::IFile.
|
overridevirtual |
Stat a file.
[in] | url | URL of file. |
[out] | buffer | The stat info. |
Returns 0 on success, non-zero otherwise (see fstat() return values).
Implements XFILE::IFile.
|
overridevirtual |
Write data to file.
[in] | lpBuf | Data to write. |
[in] | uiBufSize | Number of bytes to write. |
Reimplemented from XFILE::IFile.