#include "rtc_base/system/file_wrapper.h"
#include <stddef.h>
#include <cerrno>
#include <cstdint>
#include <string>
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "rtc_base/checks.h"
#include "rtc_base/numerics/safe_conversions.h"
#ifdef _WIN32
#include <Windows.h>
#else
#endif
#include <utility>
namespace webrtc {
namespace {
FILE* FileOpen(absl::string_view file_name_utf8, bool read_only, int* error) { … }
}
FileWrapper FileWrapper::OpenReadOnly(absl::string_view file_name_utf8) { … }
FileWrapper FileWrapper::OpenWriteOnly(absl::string_view file_name_utf8,
int* error ) { … }
FileWrapper::FileWrapper(FileWrapper&& other) { … }
FileWrapper& FileWrapper::operator=(FileWrapper&& other) { … }
bool FileWrapper::SeekRelative(int64_t offset) { … }
bool FileWrapper::SeekTo(int64_t position) { … }
absl::optional<size_t> FileWrapper::FileSize() { … }
bool FileWrapper::Flush() { … }
size_t FileWrapper::Read(void* buf, size_t length) { … }
bool FileWrapper::ReadEof() const { … }
bool FileWrapper::Write(const void* buf, size_t length) { … }
bool FileWrapper::Close() { … }
FILE* FileWrapper::Release() { … }
}