1in input File open for reading: the internal stream buffer supports input operations.
2out output File open for writing: the internal stream buffer supports output operations.
3binary binary Operations are performed in binary mode rather than text.
4ate at end The output position starts at the end of the file.
5app append All output operations happen at the end of the file, appending to its existing contents.
6trunc truncate Any contents that existed in the file before it is open are discarded.