file::construct()
The constructor. Create an instance of class file and open a file
file::construct(filename, mode)
filename (string) — File name to be openedmode (number) — File mode
file — Returns the instance of class file and handle to the opened file. If file cannot be opened then nothing is returned
import fileio
f = file("data.txt", file_write)
if !is_nothing(f)
' Success, do something here
else
writeln("Failed to open the file")
endif