- Function
Open and possibly create a file.
- Header
- Declaration
int open (const char* name, int flags, ...);- Description
openopens a file and returns the file descriptor associated with it. On error, -1 is returned and an error code is stored inerrno. Several flags may be passed toopenthat change the behaviour.- Limits
- POSIX specifies an additional
modeargument that may be passed to open, which is used as the permission mask when a new file is created. While cc65 allows to pass this argument, it is ignored.- Availability
POSIX 1003.1
- See also
- Example
None.