r
Open the file for reading only; the file must already exist. This is the default value if access is not specified.
Open the file for both reading and writing; the file must already exist.
Open the file for writing only. Truncate it if it exists. If it doesn't exist, create a new file.
Open the file for reading and writing. Truncate it if it exists. If it doesn't exist, create a new file.
Open the file for writing only. The file must already exist, and the file is positioned so that new data is appended to the file.
Open the file for reading and writing. If the file doesn't exist, create a new empty file. Set the initial access position to the end of the file.