#include "util/file/file_writer.h"
#include <limits.h>
#include <stddef.h>
#include <string.h>
#include <algorithm>
#include "base/check_op.h"
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
#include "build/build_config.h"
#include "util/misc/implicit_cast.h"
#if BUILDFLAG(IS_POSIX)
#include <sys/uio.h>
#include <unistd.h>
#include "base/posix/eintr_wrapper.h"
#endif
namespace crashpad {
#if BUILDFLAG(IS_POSIX)
static_assert …;
static_assert …;
static_assert …;
#endif
WeakFileHandleFileWriter::WeakFileHandleFileWriter(FileHandle file_handle)
: … { … }
WeakFileHandleFileWriter::~WeakFileHandleFileWriter() { … }
bool WeakFileHandleFileWriter::Write(const void* data, size_t size) { … }
bool WeakFileHandleFileWriter::WriteIoVec(std::vector<WritableIoVec>* iovecs) { … }
FileOffset WeakFileHandleFileWriter::Seek(FileOffset offset, int whence) { … }
FileWriter::FileWriter()
: … { … }
FileWriter::~FileWriter() { … }
bool FileWriter::Open(const base::FilePath& path,
FileWriteMode write_mode,
FilePermissions permissions) { … }
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
bool FileWriter::OpenMemfd(const base::FilePath& path) { … }
int FileWriter::fd() { … }
#endif
void FileWriter::Close() { … }
bool FileWriter::Write(const void* data, size_t size) { … }
bool FileWriter::WriteIoVec(std::vector<WritableIoVec>* iovecs) { … }
FileOffset FileWriter::Seek(FileOffset offset, int whence) { … }
}