Home | History | Annotate | Download | only in unix_file

Lines Matching refs:byte_count

138 int64_t FdFile::Read(char* buf, int64_t byte_count, int64_t offset) const {
140 int rc = TEMP_FAILURE_RETRY(pread64(fd_, buf, byte_count, offset));
142 int rc = TEMP_FAILURE_RETRY(pread(fd_, buf, byte_count, offset));
163 int64_t FdFile::Write(const char* buf, int64_t byte_count, int64_t offset) {
165 int rc = TEMP_FAILURE_RETRY(pwrite64(fd_, buf, byte_count, offset));
167 int rc = TEMP_FAILURE_RETRY(pwrite(fd_, buf, byte_count, offset));
181 bool FdFile::ReadFully(void* buffer, size_t byte_count) {
183 while (byte_count > 0) {
184 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd_, ptr, byte_count));
190 byte_count -= bytes_read; // Reduce the number of remaining bytes.
196 bool FdFile::WriteFully(const void* buffer, size_t byte_count) {
199 while (byte_count > 0) {
200 ssize_t bytes_written = TEMP_FAILURE_RETRY(write(fd_, ptr, byte_count));
204 byte_count -= bytes_written; // Reduce the number of remaining bytes.