|
int | jami::fileutils::accessFile (const std::string &file, int mode) |
| Windows compatibility wrapper for checking read-only attribute.
|
|
bool | jami::fileutils::createFileLink (const std::filesystem::path &linkFile, const std::filesystem::path &target, bool hard) |
|
std::string | jami::fileutils::expand_path (const std::string &path) |
| Expand the given path.
|
|
const std::filesystem::path & | jami::fileutils::get_cache_dir () |
|
std::filesystem::path | jami::fileutils::get_cache_dir (const char *pkg) |
|
const std::filesystem::path & | jami::fileutils::get_config_dir () |
|
std::filesystem::path | jami::fileutils::get_config_dir (const char *pkg) |
|
const std::filesystem::path & | jami::fileutils::get_data_dir () |
|
std::filesystem::path | jami::fileutils::get_data_dir (const char *pkg) |
|
const std::filesystem::path & | jami::fileutils::get_home_dir () |
|
const std::filesystem::path & | jami::fileutils::get_resource_dir_path () |
| Get the resource directory path that was set with set_resource_dir_path.
|
|
std::string | jami::fileutils::getCleanPath (const std::string &base, const std::string &path) |
| If path is contained in base, return the suffix, otherwise return the full path.
|
|
std::string_view | jami::fileutils::getFileExtension (std::string_view filename) |
|
std::filesystem::path | jami::fileutils::getFullPath (const std::filesystem::path &base, const std::filesystem::path &path) |
| If path is relative, it is appended to base.
|
|
bool | jami::fileutils::isDirectoryWritable (const std::string &directory) |
|
bool | jami::fileutils::isPathRelative (const std::filesystem::path &path) |
|
uint64_t | jami::fileutils::lastWriteTimeInSeconds (const std::filesystem::path &filePath) |
| Return the last write time (epoch time) of a given file path (in seconds).
|
|
std::vector< uint8_t > | jami::fileutils::loadCacheFile (const std::filesystem::path &path, std::chrono::system_clock::duration maxAge) |
|
std::string | jami::fileutils::loadCacheTextFile (const std::filesystem::path &path, std::chrono::system_clock::duration maxAge) |
|
std::vector< uint8_t > | jami::fileutils::loadFile (const std::filesystem::path &path, const std::filesystem::path &default_dir={}) |
| Read the full content of a file at path.
|
|
std::string | jami::fileutils::loadTextFile (const std::filesystem::path &path, const std::filesystem::path &default_dir) |
|
ArchiveStorageData | jami::fileutils::readArchive (const std::filesystem::path &path, std::string_view scheme, const std::string &pwd) |
|
void | jami::fileutils::saveFile (const std::filesystem::path &path, const std::vector< uint8_t > &data, mode_t mode=0644) |
|
void | jami::fileutils::saveFile (const std::filesystem::path &path, const uint8_t *data, size_t data_size, mode_t mode=0644) |
|
void | jami::fileutils::set_resource_dir_path (const std::filesystem::path &resourceDirPath) |
| Set the program's resource directory path.
|
|
std::string | jami::fileutils::sha3File (const std::filesystem::path &path) |
|
std::string | jami::fileutils::sha3sum (const std::vector< uint8_t > &buffer) |
|
int64_t | jami::fileutils::size (const std::filesystem::path &path) |
|
bool | jami::fileutils::writeArchive (const std::string &archive_str, const std::filesystem::path &path, std::string_view scheme, const std::string &password, const std::vector< uint8_t > &password_salt) |
|