|
std::string | GetLexicallyRelative (std::string_view path, std::string_view dir) |
| Returns relative path from full path.
|
|
FileInfoWithDataMap | ReadRecursiveFilesInfoWithData (engine::TaskProcessor &async_tp, const std::string &path, utils::Flags< SettingsReadFile > flags={SettingsReadFile::kSkipHidden}) |
| Returns files from recursively traversed directory.
|
|
std::string | ReadFileContents (engine::TaskProcessor &async_tp, const std::string &path) |
| Reads file contents asynchronously.
|
|
bool | FileExists (engine::TaskProcessor &async_tp, const std::string &path) |
| Checks whether the file exists asynchronosly.
|
|
void | RewriteFileContents (engine::TaskProcessor &async_tp, const std::string &path, std::string_view contents) |
| Rewrite file contents asynchronously It doesn't provide strict atomic guarantees. If you need them, use fs::RewriteFileContentsAtomically .
|
|
void | Rename (engine::TaskProcessor &async_tp, const std::string &source, const std::string &destination) |
| Renames existing file.
|
|
void | RewriteFileContentsAtomically (engine::TaskProcessor &async_tp, const std::string &path, std::string_view contents, boost::filesystem::perms perms) |
| Rewrite file contents atomically Write contents to temporary file in the same directory, then atomically replaces the destination file with the temporary file. Effectively does open()+write()+sync()+close()+rename()+sync(directory). It does both sync(2) for file and on the directory, so after successful return the file must persist on the filesystem.
|
|
void | Chmod (engine::TaskProcessor &async_tp, const std::string &path, boost::filesystem::perms perms) |
| Change file mode.
|
|
bool | RemoveSingleFile (engine::TaskProcessor &async_tp, const std::string &path) |
| Remove existing file.
|
|
|
void | CreateDirectories (engine::TaskProcessor &async_tp, std::string_view path, boost::filesystem::perms perms) |
| Create directory and all necessary parent elements. Condition when path already exists and is a directory treated as "success" and no exception is thrown.
|
|
void | CreateDirectories (engine::TaskProcessor &async_tp, std::string_view path) |
|