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

Go to the source code of this file.

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)
 
off_t cuttlefish::FileSize (const std::string &path)
 
Result< void > 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< std::vector< uint8_t > > cuttlefish::ReadBinaryFileContents (const std::string &path)
 
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 (absl::string_view path)
 
std::string cuttlefish::CurrentDirectory ()
 
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)
 
Result< void > cuttlefish::WalkDirectoryFiles (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, absl::string_view name)