OPEN(3spp) RISC/os Reference Manual OPEN(3spp)
NAME
open - open a file for reading or writing
SYNOPSIS
#include <sys/file.h>
int open(path, flags)
char *path;
int flags;
DESCRIPTION
Open opens the file path for reading and/or writing, as
specified by the flags argument and returns a descriptor for
that file.
Path is the address of a string of ASCII characters
representing a path name, terminated by a null character.
The flags specified are formed by or'ing the following
values
O_RDONLY open for reading only
O_WRONLY open for writing only
O_RDWRD open for reading and writing
Upon successful completion, a non-negative integer termed a
file descriptor is returned. The file pointer used to mark
the current position within the file is set to the beginning
of the file.
The system imposes a limit on the number of file descriptors
open simultaneously, currently the limit is 10.
SEE ALSO
close(3spp), lseek(3spp), read(3spp), write(3spp)
Printed 1/6/92 Page 1