Android-cuttlefish cvd tool
Namespaces | Macros | Functions
file.cpp File Reference
#include "android-base/file.h"
#include <errno.h>
#include <fcntl.h>
#include <ftw.h>
#include <libgen.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <memory>
#include <mutex>
#include <string>
#include <vector>
#include "android-base/logging.h"
#include "android-base/macros.h"
#include "android-base/unique_fd.h"
#include "android-base/utf8.h"
Include dependency graph for file.cpp:

Namespaces

namespace  anonymous_namespace{file.cpp}
 
namespace  android
 
namespace  android::base
 

Macros

#define OS_PATH_SEPARATOR   '/'
 

Functions

std::string anonymous_namespace{file.cpp}::GetSystemTempDir ()
 
bool android::base::ReadFdToString (borrowed_fd fd, std::string *content)
 
bool android::base::ReadFileToString (const std::string &path, std::string *content, bool follow_symlinks)
 
bool android::base::WriteStringToFd (std::string_view content, borrowed_fd fd)
 
static bool android::base::CleanUpAfterFailedWrite (const std::string &path)
 
bool android::base::WriteStringToFile (const std::string &content, const std::string &path, mode_t mode, uid_t owner, gid_t group, bool follow_symlinks)
 
bool android::base::WriteStringToFile (const std::string &content, const std::string &path, bool follow_symlinks)
 
bool android::base::ReadFully (borrowed_fd fd, void *data, size_t byte_count)
 
bool android::base::ReadFullyAtOffset (borrowed_fd fd, void *data, size_t byte_count, off64_t offset)
 
bool android::base::WriteFullyAtOffset (borrowed_fd fd, const void *data, size_t byte_count, off64_t offset)
 
bool android::base::WriteFully (borrowed_fd fd, const void *data, size_t byte_count)
 
bool android::base::RemoveFileIfExists (const std::string &path, std::string *err)
 
bool android::base::Readlink (const std::string &path, std::string *result)
 
bool android::base::Realpath (const std::string &path, std::string *result)
 
std::string android::base::GetExecutablePath ()
 
std::string android::base::GetExecutableDirectory ()
 
static int android::base::_basename_r (const char *path, size_t path_size, char *buffer, size_t buffer_size)
 
std::string android::base::Basename (std::string_view path)
 
static int android::base::_dirname_r (const char *path, size_t path_size, char *buffer, size_t buffer_size)
 
std::string android::base::Dirname (std::string_view path)
 

Macro Definition Documentation

◆ OS_PATH_SEPARATOR

#define OS_PATH_SEPARATOR   '/'