cctools
full_io.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
3 Copyright (C) 2005- The University of Notre Dame
4 This software is distributed under the GNU General Public License.
5 See 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 
32 ssize_t full_read(int fd, void *buf, size_t count);
33 
40 ssize_t full_write(int fd, const void *buf, size_t count);
41 
49 ssize_t full_pread(int fd, void *buf, size_t count, off_t offset);
50 
58 ssize_t full_pwrite(int fd, const void *buf, size_t count, off_t offset);
59 
67 ssize_t full_pread64(int fd, void *buf, size_t count, int64_t offset);
68 
76 ssize_t full_pwrite64(int fd, const void *buf, size_t count, int64_t offset);
77 
84 ssize_t full_fread(FILE * file, void *buf, size_t count);
85 
92 ssize_t full_fwrite(FILE * file, const void *buf, size_t count);
93 
94 #endif
ssize_t full_read(int fd, void *buf, size_t count)
Read the next 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_pread(int fd, void *buf, size_t count, off_t offset)
Read arbitrary bytes from a file descriptor.
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_write(int fd, const void *buf, size_t count)
Write the next 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_pread64(int fd, void *buf, size_t count, int64_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.