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

Go to the source code of this file.

Classes

struct  cuttlefish::FileSizes
 

Namespaces

namespace  cuttlefish
 

Typedefs

using cuttlefish::WalkDirectoryCallback = std::function< Result< void >(const std::string &)>
 

Functions

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< void > cuttlefish::LinkOrCopyDirectoryContentsRecursively (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::DirectoryContentsPaths (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)
 
off_t cuttlefish::FileSize (const std::string &path)
 
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 &path)
 
Result< void > cuttlefish::WriteNewFile (const std::string &filepath, std::string_view content, mode_t mode)
 
bool cuttlefish::MakeFileExecutable (const std::string &path)
 
Result< std::chrono::system_clock::time_point > cuttlefish::FileModificationTime (const std::string &path)
 
Result< uid_t > cuttlefish::FileOwner (const std::string &path)
 
std::string cuttlefish::AbsolutePath (std::string_view 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 WalkDirectoryCallback &callback)
 
std::vector< std::string > cuttlefish::Path (const std::string &env_name)
 
Result< std::string > cuttlefish::Search (const std::vector< std::string > &path, std::string_view name)
 
Result< SharedFD > cuttlefish::CreateOrReuseAndDrainFifo (const std::string &path, mode_t mode)