Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ open(3spp) — UMIPS/BSD System Programmer's Package 2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

close(3spp)

lseek(3spp)

read(3spp)

write(3spp)

OPEN(3spp)

NAME

open − open a file for reading or writing

SYNOPSIS

#include <sys/file.h>

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_RDONLYopen for reading only
 O_WRONLYopen for writing only
 O_RDWRopen 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)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026