Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

17 lines
651 B

.TH openreadclose 3
.SH NAME
openreadclose \- read a whole file into a stralloc
.SH SYNTAX
.B #include <libowfat/openreadclose.h>
ssize_t \fBopenreadclose\fP(const char *\fIfilename\fR,
stralloc* \fIsa\fR,size_t \fIbufsize\fR);
.SH DESCRIPTION
openreadclose opens the file \fIfilename\fR for reading and reads the
whole content into the stralloc \fIsa\fR. The file is read in chunks of
\fIbufsize\fR bytes size. If everything worked fine, openreadclose
returns 1. If the file did not exist, openreadclose returns 0. On
every other error, openreadclose returns -1 and sets errno
appropriately.
.SH "SEE ALSO"
open_read(3), readclose(3)