Returns whether the DLL loaded up fine.
Tries to open a file. Returns file index or -1 if the file could not be opened.
If path is relative, the extension will look for the file in the game's save directory.
Mode is as per MSDN.
Examples:
var a_file = file_raw_open("some.bin", "wb"); // binary for writing file_raw_write_u8(a_file, 100); file_raw_write_string(a_file, "hello!"); file_raw_close(a_file); var a_file = file_raw_open("some.bin", "rb"); // binary for reading var a_byte = file_raw_read_u8(a_file); // 100 var a_string = file_raw_read_string(a_file); // "hello!" file_raw_close(a_file);
Ensures that any file changes are finalized on disk.
Native: fflush
Closes a previously open raw file, returning whether successful.
Returns whether a file_raw index is currently in use.
Note that the extension will reuse file indexes, so having "if file exists then close file" will result in familiar problems.