#include "components/paint_preview/common/file_stream.h"
#include <stdint.h>
#include <utility>
#include "base/compiler_specific.h"
namespace paint_preview {
namespace {
bool ShouldWrite(size_t current_size, size_t max_size, size_t added_size) { … }
}
FileWStream::FileWStream(base::File file)
: … { … }
FileWStream::FileWStream(base::File file, size_t max_size)
: … { … }
FileWStream::~FileWStream() = default;
bool FileWStream::write(const void* buffer, size_t size) { … }
void FileWStream::flush() { … }
size_t FileWStream::bytesWritten() const { … }
void FileWStream::Close() { … }
FileRStream::FileRStream(base::File file)
: … { … }
FileRStream::~FileRStream() = default;
size_t FileRStream::read(void* buffer, size_t size) { … }
bool FileRStream::isAtEnd() const { … }
bool FileRStream::hasLength() const { … }
size_t FileRStream::getLength() const { … }
}