- Function
Create a file.
- Header
- Declaration
int __fastcall__ creat (const char* name, unsigned mode);
- Description
creat
creates a new file and returns the file descriptor associated with it. On error, -1 is returned and an error code is stored inerrno
.- Limits
creat
is identical to callingopen
withflags
equal toO_WRONLY | O_CREAT | O_TRUNC
.- The function is only available as fastcall function, so it may only be used in presence of a prototype.
- Availability
POSIX 1003.1
- See also
- Example
None.