ate flag is given. The default mode is 8r666. Allowed flags are as follows:

 * :r - open this file for reading
 * :w - open this file for writing
 * :c - create a new file (O\_CREATE)
 * :e - fail if the file exists (O\_EXCL)
 * :t - shorten an existing file to length 0 (O\_TRUNC)

Posix-only flags:

 * :a - append to a file (O\_APPEND)
 * :x - O\_SYNC
 * :C - O\_NOCTTY

Windows-only flags:

 * :R - share reads (FILE\_SHARE\_READ)
 * :W - share writes (FILE\_SHARE\_WRITE)
  * :D - share deletes (FILE\_SHAR