2004-02-27 17:04:02 +00:00
|
|
|
.TH io_readfile 3
|
|
|
|
.SH NAME
|
|
|
|
io_readfile \- open a file for reading
|
|
|
|
.SH SYNTAX
|
2017-05-13 22:51:26 +00:00
|
|
|
.B #include <libowfat/io.h>
|
2004-02-27 17:04:02 +00:00
|
|
|
|
2020-11-08 00:29:35 +00:00
|
|
|
int \fBio_readfile\fP(int64* d,const char* filename);
|
2004-02-27 17:04:02 +00:00
|
|
|
.SH DESCRIPTION
|
|
|
|
io_readfile sets d to the number of a new descriptor reading from the
|
2020-11-08 00:29:35 +00:00
|
|
|
disk file named \fIfilename\fR, and returns 1.
|
2004-02-27 17:04:02 +00:00
|
|
|
|
|
|
|
If something goes wrong, io_readfile sets \fIerrno\fR to indicate the error, and
|
|
|
|
returns 0; it does not create a new descriptor, and it does not touch d.
|
|
|
|
.SH "SEE ALSO"
|
2016-10-11 11:45:46 +00:00
|
|
|
io_createfile(3), io_appendfile(3), io_readwritefile(3)
|