Mode the file should be opened in. That is, to open, create, append, or truncate the file.
The permissions on the file stream. That is, read access, write access, or both.
The sharing permissions other processes are allowed on the file stream when trying to open the same file. By default, other processes are prevented from opening the file if they request read, write, or delete access. If you wish to allow other processes to read the file while it is open in this process, set this to Share.read. Currently only used by Windows.
The share parameter is currently only used by Windows.
immutable flags = FileFlags(Mode.open, Access.read);
Constructs the FileFlag with the given mode, access, and share attributes. These high-level flags are converted to the equivalent platform-specific flags that are needed when opening the file.