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

#include <memory_file.h>

Inheritance diagram for shaka::MemoryFile:

Public Member Functions

 MemoryFile (const std::string &file_name, const std::string &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 void DeleteAll ()
 
static void Delete (const std::string &file_name)
 

Protected Member Functions

bool Open () override
 

Detailed Description

Implements a File that is stored in memory. This should be only used for testing, since this does not support larger files.

Definition at line 21 of file memory_file.h.

Member Function Documentation

◆ Delete()

void shaka::MemoryFile::Delete ( const std::string &  file_name)
static

Deletes the memory file data with the given file_name. Any objects open with that file name will be in an undefined state.

Definition at line 194 of file memory_file.cc.

◆ DeleteAll()

void shaka::MemoryFile::DeleteAll ( )
static

Deletes all memory file data created. This assumes that there are no MemoryFile objects alive. Any alive objects will be in an undefined state.

Definition at line 190 of file memory_file.cc.


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