Open and possibly create a file.
int open (const char* name, int flags, ...);
openopens a file and returns the file descriptor associated with it. On error, -1 is returned and an error code is stored in
errno. Several flags may be passed to
openthat change the behaviour.
- 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.
- See also