FileInfo.Open Method (FileMode, FileAccess)
Opens a file in the specified mode with read, write, or read/write access.
Assembly: mscorlib (in mscorlib.dll)
- Type: System.IO.FileMode
A FileMode constant specifying the mode (for example, Open or Append) in which to open the file.
The caller does not have the required permission.
The file is not found.
path is read-only or is a directory.
The specified path is invalid, such as being on an unmapped drive.
The file is already open.
Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)