Shaka Player Embedded
|
#include <file_system.h>
Public Member Functions | |
FileSystem () | |
virtual | ~FileSystem () |
virtual bool | FileExists (const std::string &path) const |
virtual bool | DirectoryExists (const std::string &path) const |
virtual ssize_t | FileSize (const std::string &path) const |
virtual MUST_USE_RESULT bool | DeleteFile (const std::string &path) const |
virtual MUST_USE_RESULT bool | CreateDirectory (const std::string &path) const |
virtual MUST_USE_RESULT bool | ListFiles (const std::string &path, std::vector< std::string > *files) const |
virtual MUST_USE_RESULT bool | ReadFile (const std::string &path, std::vector< uint8_t > *data) const |
virtual MUST_USE_RESULT bool | WriteFile (const std::string &path, const std::vector< uint8_t > &data) const |
Static Public Member Functions | |
static std::string | PathJoin (const std::string &a, const std::string &b) |
static std::string | DirName (const std::string &path) |
static std::string | GetPathForStaticFile (const std::string &static_data_dir, bool is_bundle_relative, const std::string &file) |
static std::string | GetPathForDynamicFile (const std::string &dynamic_data_dir, const std::string &file) |
An abstraction of the file system. This manages interactions with the file system like reading and writing files.
Definition at line 30 of file file_system.h.
shaka::util::FileSystem::FileSystem | ( | ) |
Definition at line 42 of file file_system.cc.
|
virtual |
Definition at line 43 of file file_system.cc.
|
virtual |
Creates a directory (and any parent directories) at the given path.
path | The path to the directory to create. |
Definition at line 68 of file file_system_posix.cc.
|
virtual |
Deletes the given file, file must already exist.
path | The path to the file to delete. |
Definition at line 64 of file file_system_posix.cc.
|
virtual |
Definition at line 59 of file file_system_posix.cc.
|
static |
Definition at line 45 of file file_system_posix.cc.
|
virtual |
Definition at line 53 of file file_system_posix.cc.
|
virtual |
Definition at line 62 of file file_system.cc.
|
static |
Definition at line 57 of file file_system.cc.
|
static |
Definition at line 46 of file file_system.cc.
|
virtual |
Lists the files that are in the given directory.
path | The path to the directory to search. |
files | [OUT] Will contain the names of the files contained. |
Definition at line 78 of file file_system_posix.cc.
|
static |
Definition at line 34 of file file_system_posix.cc.
|
virtual |
path | The path of the file to read. |
data | [OUT] Where to put the contents of the file. |
Definition at line 79 of file file_system.cc.
|
virtual |
path | The path of the file to write to. |
data | The data to write into the file. |
Definition at line 105 of file file_system.cc.