Shaka Packager SDK
Loading...
Searching...
No Matches
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.

◆ ~LocalFile()

shaka::LocalFile::~LocalFile ( )
overrideprotected

Definition at line 115 of file local_file.cc.

Member Function Documentation

◆ Close()

bool shaka::LocalFile::Close ( )
override

Definition at line 34 of file local_file.cc.

◆ CloseForWriting()

void shaka::LocalFile::CloseForWriting ( )
override

Definition at line 68 of file local_file.cc.

◆ 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.

◆ Flush()

bool shaka::LocalFile::Flush ( )
override

Definition at line 89 of file local_file.cc.

◆ Open()

bool shaka::LocalFile::Open ( )
overrideprotected

Definition at line 117 of file local_file.cc.

◆ Read()

int64_t shaka::LocalFile::Read ( void *  buffer,
uint64_t  length 
)
override

Definition at line 44 of file local_file.cc.

◆ Seek()

bool shaka::LocalFile::Seek ( uint64_t  position)
override

Definition at line 94 of file local_file.cc.

◆ Size()

int64_t shaka::LocalFile::Size ( )
override

Definition at line 70 of file local_file.cc.

◆ Tell()

bool shaka::LocalFile::Tell ( uint64_t *  position)
override

Definition at line 103 of file local_file.cc.

◆ Write()

int64_t shaka::LocalFile::Write ( const void *  buffer,
uint64_t  length 
)
override

Definition at line 56 of file local_file.cc.


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