Android-cuttlefish cvd tool
Classes | Namespaces | Functions
files.h File Reference
#include <sys/stat.h>
#include <sys/types.h>
#include <chrono>
#include <cstddef>
#include <optional>
#include <string>
#include <vector>
#include "cuttlefish/common/libs/utils/result.h"
Include dependency graph for files.h:

Go to the source code of this file.

Classes

struct  cuttlefish::FileSizes
 
struct  cuttlefish::InputPathForm
 

Namespaces

namespace  cuttlefish
 

Functions

bool cuttlefish::FileExists (const std::string &path, bool follow_symlinks)
 
Result< dev_t > cuttlefish::FileDeviceId (const std::string &path)
 
Result< bool > cuttlefish::CanHardLink (const std::string &source, const std::string &destination)
 
Result< bool > cuttlefish::CanRename (const std::string &source, const std::string &destination)
 
Result< ino_t > cuttlefish::FileInodeNumber (const std::string &path)
 
Result< bool > cuttlefish::AreHardLinked (const std::string &source, const std::string &destination)
 
Result< std::string > cuttlefish::CreateHardLink (const std::string &target, const std::string &hardlink, const bool overwrite_existing)
 
Result< void > cuttlefish::CreateSymLink (const std::string &target, const std::string &link, const bool overwrite_existing)
 
Result< void > cuttlefish::HardLinkDirecoryContentsRecursively (const std::string &source, const std::string &destination)
 
Result< void > cuttlefish::MoveDirectoryContents (const std::string &source, const std::string &destination)
 
bool cuttlefish::FileHasContent (const std::string &path)
 
Result< std::vector< std::string > > cuttlefish::DirectoryContents (const std::string &path)
 
Result< std::vector< std::string > > cuttlefish::DirectoryContentsPaths (const std::string &path)
 
bool cuttlefish::DirectoryExists (const std::string &path, bool follow_symlinks)
 
bool cuttlefish::IsDirectory (const std::string &path)
 
Result< void > cuttlefish::EnsureDirectoryExists (const std::string &directory_path, const mode_t mode, const std::string &group_name)
 
Result< void > cuttlefish::ChangeGroup (const std::string &path, const std::string &group_name)
 
bool cuttlefish::CanAccess (const std::string &path, const int mode)
 
bool cuttlefish::IsDirectoryEmpty (const std::string &path)
 
Result< void > cuttlefish::RecursivelyRemoveDirectory (const std::string &path)
 
bool cuttlefish::Copy (const std::string &from, const std::string &to)
 
off_t cuttlefish::FileSize (const std::string &path)
 
bool cuttlefish::RemoveFile (const std::string &file)
 
Result< std::string > cuttlefish::RenameFile (const std::string &current_filepath, const std::string &target_filepath)
 
std::string cuttlefish::ReadFile (const std::string &file)
 
Result< std::string > cuttlefish::ReadFileContents (const std::string &filepath)
 
bool cuttlefish::MakeFileExecutable (const std::string &path)
 
Result< std::chrono::system_clock::time_point > cuttlefish::FileModificationTime (const std::string &path)
 
bool cuttlefish::FileIsSocket (const std::string &path)
 
std::string cuttlefish::FindImage (const std::string &search_path, const std::vector< std::string > &pattern)
 
std::string cuttlefish::AbsolutePath (const std::string &path)
 
std::string cuttlefish::CurrentDirectory ()
 
FileSizes cuttlefish::SparseFileSizes (const std::string &path)
 
Result< std::string > cuttlefish::FindFile (const std::string &path, const std::string &target_name)
 
Result< void > cuttlefish::WalkDirectory (const std::string &dir, const std::function< bool(const std::string &)> &callback)
 
Result< std::string > cuttlefish::EmulateAbsolutePath (const InputPathForm &path_info)