Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ open(2) — Unisoft V7

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

creat(2)

read(2)

write(2)

dup(2)

close(2)

OPEN(2)  —  UNIX Programmer’s Manual

NAME

open − open for reading or writing

SYNOPSIS

open(name, mode)
char *name;
int mode;

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 file is positioned at the beginning (byte 0).  The returned file descriptor must be used for subsequent calls for other input-output functions on the file. 

SEE ALSO

creat(2), read(2), write(2), dup(2), close(2)

DIAGNOSTICS

The value −1 is returned 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. writeable), or if too many files are open. 

7th Edition  —  2/8/82

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