karazeh
A cross-platform software updating library.
|
#include <file_manager.hpp>
Public Member Functions | |
file_manager () | |
virtual | ~file_manager () |
virtual bool | create_directory (path_t const &path) const |
virtual bool | ensure_directory (path_t const &path) const |
virtual bool | exists (path_t const &) const |
virtual bool | is_directory (path_t const &) const |
virtual bool | is_empty (path_t const &) const |
virtual bool | is_readable (path_t const &path) const |
virtual bool | is_readable (string_t const &path) const |
virtual bool | is_writable (path_t const &path) const |
virtual bool | is_writable (string_t const &path) const |
virtual bool | load_file (std::ifstream &fs, string_t &out_buf) const |
virtual bool | load_file (string_t const &path, string_t &out_buf) const |
virtual bool | load_file (path_t const &path, string_t &out_buf) const |
virtual bool | make_executable (path_t const &) const |
virtual bool | move (path_t const &, path_t const &) const |
virtual bool | remove_directory (path_t const &) const |
virtual bool | remove_file (path_t const &) const |
virtual uint64_t | stat_filesize (path_t const &) const |
virtual uint64_t | stat_filesize (std::ifstream &) const |
Public Member Functions inherited from kzh::logger | |
logger (string_t context) | |
virtual | ~logger () |
logstream | alert () const |
logstream | crit () const |
logstream | debug () const |
logstream | error () const |
logstream | info () const |
logstream | notice () const |
logstream | plain () const |
void | set_uuid_prefix (string_t const &) |
string_t const & | uuid_prefix () const |
logstream | warn () const |
Additional Inherited Members | |
Static Public Member Functions inherited from kzh::logger | |
static void | deindent () |
static void | enable_timestamps (bool on_or_off) |
static void | indent () |
static void | mute () |
static void | set_app_name (string_t const &app_name) |
static void | set_stream (std::ostream *) |
static void | set_threshold (char level) |
static void | unmute () |
Protected Member Functions inherited from kzh::logger | |
void | rename_context (string_t const &) |
kzh::file_manager::file_manager | ( | ) |
|
virtual |
|
virtual |
Creates a directory indicated by the given path, while creating all necessary ancestor directories (similar to mkdir -p)
Returns false if the directories couldn't be created, and the cause will be logged.
References kzh::logger::error().
Referenced by kzh::patcher::apply_update(), ensure_directory(), kzh::delete_operation::stage(), kzh::update_operation::stage(), kzh::create_operation::stage(), and TEST_CASE().
|
virtual |
References create_directory(), and is_directory().
Referenced by kzh::create_operation::stage().
|
virtual |
Referenced by kzh::create_operation::commit(), kzh::update_operation::commit(), kzh::delete_operation::deploy(), kzh::create_operation::has_deployed(), is_readable(), is_writable(), move(), kzh::update_operation::rollback(), kzh::delete_operation::stage(), kzh::create_operation::stage(), and TEST_CASE().
|
virtual |
References is_readable().
Referenced by ensure_directory(), is_readable(), is_writable(), kzh::update_operation::stage(), and TEST_CASE().
|
virtual |
Referenced by kzh::create_operation::rollback().
|
virtual |
Checks if the resource at the given path exists, is a file, and is readable.
Referenced by kzh::delta_encoder::delta(), kzh::create_operation::deploy(), kzh::downloader::fetch(), kzh::version_manifest::get_current_version(), is_directory(), kzh::version_manifest::parse(), kzh::delta_encoder::patch(), remove_directory(), kzh::delta_encoder::signature(), kzh::update_operation::stage(), kzh::create_operation::stage(), and TEST_CASE().
|
virtual |
References kzh::logger::error(), exists(), and is_directory().
|
virtual |
Checks if the resource at the given path exists, is a file, and is writable.
Referenced by kzh::delta_encoder::delta(), kzh::create_operation::deploy(), is_writable(), kzh::delta_encoder::patch(), remove_file(), kzh::delta_encoder::signature(), kzh::create_operation::stage(), and TEST_CASE().
|
virtual |
References exists(), is_directory(), and is_writable().
|
virtual |
Loads the content of a file stream into memory
Referenced by kzh::downloader::fetch(), load_file(), and TEST_CASE().
Loads the content of a file found at into memory
References load_file().
References load_file().
|
virtual |
Enables the executable permission flag for systems that support it.
The file will have a permission mask equal to 0711
Returns false if the permissions couldn't be modified.
References kzh::logger::error().
Referenced by kzh::create_operation::deploy().
|
virtual |
References is_readable().
Referenced by kzh::patcher::apply_update(), kzh::create_operation::rollback(), and TEST_CASE().
|
virtual |
References is_writable().
Referenced by kzh::create_operation::commit(), kzh::delete_operation::commit(), kzh::update_operation::commit(), kzh::update_operation::rollback(), and TEST_CASE().
Referenced by kzh::update_operation::deploy(), kzh::update_operation::stage(), and TEST_CASE().
|
virtual |