# open function

open

    	Library:   unistd.h
    		   sys/types.h
    		   sys/stat.h
    		   fcntl.h

    	Prototype: int open(char *Path, int Flags);

    	Syntax:    int fd;
    		   char *Path="/tmp/file";
    		   int Flags= O_WRONLY;

    		   fd = open(Path, Flags);

Flags specify the file attributes. They must contain one of O_RDONLY, O_WRONLY or O_RDWR and may also have any of the following. O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_NDELAY, O_SYNC. See the man page for full details.

## Examples:

pipe example program.

## See Also:

pipe function.

close function.

write function.

fopen function.

Top | Master Index | Keywords | Functions