Opens or creates a file, returning a File handle on success. File handles should be closed with delete or CloseHandle(). The open mode may be one of the following strings: "r": Open an existing file for reading. "w": Create a file for writing, or truncate (delete the contents of) an existing file and then open it for writing. "wx": Create file for writing, fails if file already exists. "a": Create a file for writing, or open an existing file such that writes will be appended to the end. "r+": Open an existing file for both reading and writing. "w+": Create a file for reading and writing, or truncate an existing file and then open it for reading and writing. "a+": Create a file for both reading and writing, or open an existing file such that writes will be appended to the end. The open mode may also contain an additional character after "r", "w", or "a", but before the "+" sign. This character may be "b" (indicating binary mode) or "t" (indicating text mode). By default, "text" mode is implied. On Linux and Mac, this has no distinction from binary mode. On Windows, it causes the '\n' character (0xA) to be written as "\r\n" (0xD, 0xA). Example: "rb" opens a binary file for reading; "at" opens a text file for appending.
native File OpenFile(const char[] file, const char[] mode, bool use_valve_fs = false, const char[] valve_path_id = "GAME")