Shaka Packager SDK
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
shaka::LocalFile Class Reference

Implement LocalFile which deals with local storage. More...

#include <local_file.h>

Inheritance diagram for shaka::LocalFile:

Public Member Functions

 LocalFile (const char *file_name, const char *mode)
 
File implementation overrides.
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 Public Member Functions

static bool Delete (const char *file_name)
 

Protected Member Functions

bool Open () override
 

Detailed Description

Implement LocalFile which deals with local storage.

Definition at line 19 of file local_file.h.

Constructor & Destructor Documentation

◆ LocalFile()

shaka::LocalFile::LocalFile ( const char *  file_name,
const char *  mode 
)
Parameters
file_nameC string containing the name of the file to be accessed.
modeC string containing a file access mode, refer to fopen for the available modes.

Definition at line 28 of file local_file.cc.

Member Function Documentation

◆ Delete()

bool shaka::LocalFile::Delete ( const char *  file_name)
static

Delete a local file.

Parameters
file_nameis the path of the file to be deleted.
Returns
true if successful, or false otherwise.

Definition at line 138 of file local_file.cc.


The documentation for this class was generated from the following files: