CREAT(3) Library Functions Manual CREAT(3)

creatcreate a new file or rewrite an existing one

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int creat(const char *path, mode_t mode);

The function call:

creat(path, mode)
is equivalent to:
open(path, O_WRONLY|O_CREAT|O_TRUNC, mode)

Refer to open(3) .

Refer to open(3) .

None.

None.

None.

open(3) , <fcntl.h> , <sys/stat.h> , <sys/types.h> .

Derived from Issue 1 of the SVID.

February 1997 posix.fail