Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

 

open − open a file for reading or writing

#include <sys/file.h>
open(path, flags)
char *path;
int flags;

opens the file for reading and/or writing, as specified by the argument and returns a descriptor for that file.  is the address of a string of ASCII characters representing a path name, terminated by a null character.  The flags specified are formed by 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.  close(3spp), lseek(3spp), read(3spp), write(3spp)

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