zenilib
0.5.3.0
|
#include <File_Ops.h>
Inherits Zeni::Singleton< File_Ops >.
Public Member Functions | |
String | get_appdata_path () |
Get the path that should be used for user-modifiable storage. More... | |
const String & | get_username () |
Get the logged-in user's username. More... | |
Public Member Functions inherited from Zeni::Singleton< File_Ops > | |
void | fax_post_reinit (Event::Handler *const &handler) |
void | fax_pre_uninit (Event::Handler *const &handler) |
void | give_post_reinit (Event::Handler *const &handler) |
void | give_pre_uninit (Event::Handler *const &handler) |
void | lend_post_reinit (Event::Handler *const &handler) |
void | lend_pre_uninit (Event::Handler *const &handler) |
Static Public Member Functions | |
static bool | copy_file (const String &from, const String &to) |
Copy a file from one filepath to another. More... | |
static bool | create_directory (const String &directory_path) |
Create a directory if it doesn't already exist; It is not considered an error if it already exists. More... | |
static bool | delete_file (const String &file_path) |
Delete a file. More... | |
static bool | file_exists (const String &file_path) |
Test for the existence of a file. More... | |
static FILE * | get_asset_FILE (const String &filename, off_t *const &start=0, off_t *const &length=0) |
Get a FILE * from an Asset. More... | |
static const String & | get_uniqname () |
Get the unique app identifier for the game, set in zenilib.xml. More... | |
static String & | load_asset (String &memory, const String &filename) |
Load a file into memory. More... | |
static void | preinit (const String &unique_app_identifier) |
static bool | remove_directory (const String &directory_path) |
Remove a directory if it exists; It is not considered an error if it does not exist. More... | |
Static Public Member Functions inherited from Zeni::Singleton< File_Ops > | |
static void | completely_destroy () |
static void | destroy () |
static File_Ops & | get () |
static bool | is_initialized () |
static void | remove_post_reinit (Event::Handler *const &handler) |
static void | remove_pre_uninit (Event::Handler *const &handler) |
Friends | |
class | Singleton< File_Ops > |
Additional Inherited Members | |
Protected Member Functions inherited from Zeni::Singleton< File_Ops > | |
Singleton () | |
virtual | ~Singleton () |
Definition at line 38 of file File_Ops.h.
Copy a file from one filepath to another.
Definition at line 264 of file File_Ops.cpp.
References Zeni::String::c_str().
Referenced by Zeni::Video::revert(), and Zeni::Video::save().
Create a directory if it doesn't already exist; It is not considered an error if it already exists.
Definition at line 231 of file File_Ops.cpp.
References Zeni::String::c_str(), and NULL.
Referenced by Zeni::Video::save().
Delete a file.
Definition at line 255 of file File_Ops.cpp.
References Zeni::String::c_str().
Referenced by Zeni::Video::revert().
Test for the existence of a file.
Definition at line 250 of file File_Ops.cpp.
References Zeni::String::c_str().
String Zeni::File_Ops::get_appdata_path | ( | ) |
Get the path that should be used for user-modifiable storage.
Definition at line 223 of file File_Ops.cpp.
Referenced by load_config(), Zeni::Video::revert(), and Zeni::Video::save().
|
static |
Get a FILE * from an Asset.
Definition at line 134 of file File_Ops.cpp.
References Zeni::String::c_str(), file, SEEK_END, SEEK_SET, ZENI_LOGE(), and ZENI_LOGI().
Referenced by Zeni::Image::Image().
Get the unique app identifier for the game, set in zenilib.xml.
Get the logged-in user's username.
Definition at line 219 of file File_Ops.cpp.
Load a file into memory.
Definition at line 190 of file File_Ops.cpp.
References Zeni::String::begin(), Zeni::String::end(), EOF, file, Zeni::String::resize(), and ZENI_LOGE().
Referenced by Zeni::Database< TYPE >::load_file().
Definition at line 276 of file File_Ops.cpp.
References Zeni::String::empty().
Referenced by load_config().
Remove a directory if it exists; It is not considered an error if it does not exist.
Definition at line 241 of file File_Ops.cpp.
References Zeni::String::c_str().
Definition at line 39 of file File_Ops.h.