opens a file for unbuffered reading or writing
name of the file to be opened
one of READ or WRITE
The open function opens the file with the specified name for unbuffered reading or writing (as specified by mode) and returns a file descriptor (a small integer).
RAW file I/O is always done with a file type of BINARY.
The special file names 'default' and 'terminal', referring to the current and top-level input or output streams, cannot be used with open.
If the file is being opened for reading and does not exist, open generates an error.
If the file is being opened for writing and does not exist, it is created if possible; otherwise, open generates an error.
If the file is already open, open generates an error.
If the limit for the maximum number of simultaneously open files has been reached, open generates an error.
fd ≔ open⁡testFile,WRITE
fprintf⁡fd,This is a test
Download Help Document