30bool FileExists(
const std::string& path,
bool follow_symlinks =
true);
33 const std::string& destination);
35 const std::string& destination) {
40 const std::string& destination);
42 const std::string& hardlink,
43 bool overwrite_existing =
false);
45 bool overwrite_existing =
false);
47 const std::string& source,
const std::string& destination);
51 const std::string& destination);
55 const std::string& path);
56bool DirectoryExists(
const std::string& path,
bool follow_symlinks =
true);
61 mode_t mode = S_IRWXU | S_IRWXG | S_IROTH |
63 const std::string& group_name =
"");
65 const std::string& group_name);
66bool CanAccess(
const std::string& path,
int mode);
69bool Copy(
const std::string& from,
const std::string& to);
70off_t
FileSize(
const std::string& path);
72Result<std::string>
RenameFile(
const std::string& current_filepath,
73 const std::string& target_filepath);
74std::string
ReadFile(
const std::string& file);
78 const std::string& path);
83std::string
FindImage(
const std::string& search_path,
84 const std::vector<std::string>& pattern);
102 const std::string& target_name);
105 const std::string& dir,
106 const std::function<
bool(
const std::string&)>& callback);
Definition: expected.h:86
static struct et_list link
Definition: ext2_err.c:210
Definition: alloc_utils.cpp:23
Result< dev_t > FileDeviceId(const std::string &path)
Definition: files.cpp:81
Result< std::string > RenameFile(const std::string ¤t_filepath, const std::string &target_filepath)
Definition: files.cpp:497
std::string AbsolutePath(const std::string &path)
Definition: files.cpp:446
bool IsDirectoryEmpty(const std::string &path)
Definition: files.cpp:303
Result< ino_t > FileInodeNumber(const std::string &path)
Definition: files.cpp:97
bool RemoveFile(const std::string &file)
Definition: files.cpp:507
off_t FileSize(const std::string &path)
Definition: files.cpp:467
bool DirectoryExists(const std::string &path, bool follow_symlinks)
Definition: files.cpp:235
Result< void > ChangeGroup(const std::string &path, const std::string &group_name)
Definition: files.cpp:283
Result< void > MoveDirectoryContents(const std::string &source, const std::string &destination)
Definition: files.cpp:188
bool IsDirectory(const std::string &path)
Definition: files.h:57
Result< void > HardLinkDirecoryContentsRecursively(const std::string &source, const std::string &destination)
Definition: files.cpp:164
Result< void > EnsureDirectoryExists(const std::string &directory_path, const mode_t mode, const std::string &group_name)
Definition: files.cpp:246
bool FileHasContent(const std::string &path)
Definition: files.cpp:160
Result< void > WalkDirectory(const std::string &dir, const std::function< bool(const std::string &)> &callback)
Definition: files.cpp:651
Result< std::string > FindFile(const std::string &path, const std::string &target_name)
Definition: files.cpp:633
std::string FindImage(const std::string &search_path, const std::vector< std::string > &pattern)
Definition: files.cpp:621
Result< std::vector< std::string > > DirectoryContentsPaths(const std::string &path)
Definition: files.cpp:226
bool CanAccess(const std::string &path, const int mode)
Definition: files.cpp:299
Result< void > CreateSymLink(const std::string &target, const std::string &link, const bool overwrite_existing)
Definition: files.cpp:141
Result< std::vector< std::string > > DirectoryContents(const std::string &path)
Definition: files.cpp:212
Result< std::chrono::system_clock::time_point > FileModificationTime(const std::string &path)
Definition: files.cpp:480
Result< bool > CanRename(const std::string &source, const std::string &destination)
Definition: files.h:34
bool FileExists(const std::string &path, bool follow_symlinks)
Definition: files.cpp:76
bool FileIsSocket(const std::string &path)
Definition: files.cpp:610
Result< std::string > ReadFileContents(const std::string &filepath)
Definition: files.cpp:536
std::string ReadFile(const std::string &file)
Definition: files.cpp:517
Result< bool > CanHardLink(const std::string &source, const std::string &destination)
Definition: files.cpp:91
std::string CurrentDirectory()
Definition: files.cpp:549
Result< void > RecursivelyRemoveDirectory(const std::string &path)
Definition: files.cpp:323
Result< bool > AreHardLinked(const std::string &source, const std::string &destination)
Definition: files.cpp:107
bool MakeFileExecutable(const std::string &path)
Definition: files.cpp:475
bool Copy(const std::string &from, const std::string &to)
Definition: files.cpp:388
Result< std::string > CreateHardLink(const std::string &target, const std::string &hardlink, const bool overwrite_existing)
Definition: files.cpp:115
Result< std::string > EmulateAbsolutePath(const InputPathForm &path_info)
Definition: files.cpp:704
FileSizes SparseFileSizes(const std::string &path)
Definition: files.cpp:563
off_t sparse_size
Definition: files.h:94
off_t disk_size
Definition: files.h:95