OpenFile
Category: Files
Signature
OpenFile(fileName As String)
OpenFile(fileName As String, writeable As Boolean)
Returns
Integer
Description
Opens a file and returns an integer file handle. If the file cannot be opened, the result is 0.
When the optional writeable argument is omitted or False, the file is opened in read-only mode and must already exist.
When writeable is True, the file is opened in read/write mode and is created if it does not already exist.
Example
Dim fileHandle As Integer
fileHandle = OpenFile("stages/1.txt")
fileHandle = OpenFile("save.dat", True)