Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
open
◄Description► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
Include: <fcntl.h>, <io.h>, <sys\types.h>, <sys\stat.h>
Syntax: int open( char *filename, int oflag[, int pmode ] );
oflag: O_APPEND, O_BINARY, O_CREAT, O_EXCL, O_RDONLY,
O_RDWR, O_TEXT, O_TRUNC, O_WRONLY
(may be joined by |)
pmode: S_IWRITE, S_IREAD, S_IREAD | S_IWRITE
Returns: a handle if successful, or -1 if not.
errno: EACCES, EEXIST, EINVAL, EMFILE, ENOENT
See also: access, chmod, close, creat, dup, dup2, fopen, sopen,
umask
-♦-