7.5 creat Function

Obsolete function

Attention: This interface function is implemented only by MPLAB XC32 C compilers.

Include

<fcntl.h>

Prototype

int creat(const char * filename, mode_t mode)

Arguments

filename
name of the file to open
mode
the file permission bits

Return Value

On success, creat returns a file descriptor to the open file; on error it returns -1 and should set errno to indicate the error.

Remarks

This function is implemented as a stub that must be completed to suit the application.

Opens the specified filename for writing, truncating to length zero, and creating it if it does not exist.

Source File

creat.c