Implement LocalFile which deals with local storage.
More...
#include <local_file.h>
|
| | LocalFile (const char *file_name, const char *mode) |
| |
|
| bool | Close () override |
| |
| int64_t | Read (void *buffer, uint64_t length) override |
| |
| int64_t | Write (const void *buffer, uint64_t length) override |
| |
| void | CloseForWriting () override |
| |
| int64_t | Size () override |
| |
| bool | Flush () override |
| |
| bool | Seek (uint64_t position) override |
| |
| bool | Tell (uint64_t *position) override |
| |
|
| static bool | Delete (const char *file_name) |
| |
Implement LocalFile which deals with local storage.
Definition at line 19 of file local_file.h.
◆ LocalFile()
| shaka::LocalFile::LocalFile |
( |
const char * |
file_name, |
|
|
const char * |
mode |
|
) |
| |
- Parameters
-
| file_name | C string containing the name of the file to be accessed. |
| mode | C string containing a file access mode, refer to fopen for the available modes. |
Definition at line 28 of file local_file.cc.
◆ ~LocalFile()
| shaka::LocalFile::~LocalFile |
( |
| ) |
|
|
overrideprotected |
◆ Close()
| bool shaka::LocalFile::Close |
( |
| ) |
|
|
override |
◆ CloseForWriting()
| void shaka::LocalFile::CloseForWriting |
( |
| ) |
|
|
override |
◆ Delete()
| bool shaka::LocalFile::Delete |
( |
const char * |
file_name | ) |
|
|
static |
Delete a local file.
- Parameters
-
| file_name | is the path of the file to be deleted. |
- Returns
- true if successful, or false otherwise.
Definition at line 138 of file local_file.cc.
◆ Flush()
| bool shaka::LocalFile::Flush |
( |
| ) |
|
|
override |
◆ Open()
| bool shaka::LocalFile::Open |
( |
| ) |
|
|
overrideprotected |
◆ Read()
| int64_t shaka::LocalFile::Read |
( |
void * |
buffer, |
|
|
uint64_t |
length |
|
) |
| |
|
override |
◆ Seek()
| bool shaka::LocalFile::Seek |
( |
uint64_t |
position | ) |
|
|
override |
◆ Size()
| int64_t shaka::LocalFile::Size |
( |
| ) |
|
|
override |
◆ Tell()
| bool shaka::LocalFile::Tell |
( |
uint64_t * |
position | ) |
|
|
override |
◆ Write()
| int64_t shaka::LocalFile::Write |
( |
const void * |
buffer, |
|
|
uint64_t |
length |
|
) |
| |
|
override |
The documentation for this class was generated from the following files: