Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ open(II) — UNIX 6th Edition 1.3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

creat (II)

read (II)

write (II)

close (II)

OPEN(II)  −  PWB/UNIX 8/5/73

NAME

open − open for reading or writing

SYNOPSIS

(open = 5.) 
sys open; name; mode
(file descriptor in r0) open(name, mode)
char *name;

DESCRIPTION

Open opens the file name for reading (if mode is 0), writing (if mode is 1) or for both reading and writing (if mode is 2).  Name is the address of a string of ASCII characters representing a path name, terminated by a null character.  The returned file descriptor should be saved for subsequent calls to read, write, and close. 

SEE ALSO

creat (II), read (II), write (II), close (II)

DIAGNOSTICS

The error bit (c-bit) is set if the file does not exist, if one of the necessary directories does not exist or is unreadable, if the file is not readable (resp. writable), or if too many files are open.  From C, a −1 value is returned on an error. 

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