cctools
full_io.h
Go to the documentation of this file.
1/*
2Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
3Copyright (C) 2022 The University of Notre Dame
4This software is distributed under the GNU General Public License.
5See the file COPYING for details.
6*/
7
8#ifndef FULL_IO_H
9#define FULL_IO_H
10
11#include <sys/types.h>
12
13#include <stdint.h>
14#include <stdio.h>
15
32ssize_t full_read(int fd, void *buf, size_t count);
33
40ssize_t full_write(int fd, const void *buf, size_t count);
41
49ssize_t full_pread(int fd, void *buf, size_t count, off_t offset);
50
58ssize_t full_pwrite(int fd, const void *buf, size_t count, off_t offset);
59
67ssize_t full_pread64(int fd, void *buf, size_t count, int64_t offset);
68
76ssize_t full_pwrite64(int fd, const void *buf, size_t count, int64_t offset);
77
84ssize_t full_fread(FILE * file, void *buf, size_t count);
85
92ssize_t full_fwrite(FILE * file, const void *buf, size_t count);
93
94#endif
ssize_t full_pread64(int fd, void *buf, size_t count, int64_t offset)
Read arbitrary bytes from a file descriptor.
ssize_t full_pwrite(int fd, const void *buf, size_t count, off_t offset)
Write arbitrary bytes to a file descriptor.
ssize_t full_fread(FILE *file, void *buf, size_t count)
Read the next bytes from a file stream.
ssize_t full_write(int fd, const void *buf, size_t count)
Write the next bytes to a file descriptor.
ssize_t full_pread(int fd, void *buf, size_t count, off_t offset)
Read arbitrary bytes from a file descriptor.
ssize_t full_fwrite(FILE *file, const void *buf, size_t count)
Write the next bytes to a file stream.
ssize_t full_pwrite64(int fd, const void *buf, size_t count, int64_t offset)
Write arbitrary bytes to a file descriptor.
ssize_t full_read(int fd, void *buf, size_t count)
Read the next bytes from a file descriptor.