This method opens the file that is encapsulated by the File object.
C language programmers will be immediately familiar with this method. It behaves very similarly to the fopen() call in the ANSI C language libraries. The difference is that this method lacks a filename argument which is moved to the constructor function which is called separately.
The following flag values can be used with this method:
|r||Opens the file for reading|
|r+||Opens the file for reading and writing|
|w||Opens the file for writing|
|w+||Opens the file for writing and reading|
|a||Opens the file for appending|
|a+||Opens the file for reading and appending|
|br||Opens a Windows binary file for reading|
|br+||Opens a Windows binary file for reading and writing|
|bw||Open a Windows binary file for writing|
|bw+||Opens a Windows binary file for writing and reading|
|ba||Opens a Windows binary file for appending|
|ba+||Opens a Windows binary file for reading and appending|
If you are using this in a server-side application (within NES), you should make sure the project locking is activated to avoid file corruption happening if there are multiple simultaneous accesses to the file.