FileInfo.Open Method (FileMode, FileAccess, FileShare)
April 12, 2014
Opens a file in the specified mode with read, write, or read/write access and the specified sharing option.
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.
- Type: System.IO.FileAccess
A FileAccess constant specifying whether to open the file with Read, Write, or ReadWrite file access.
The caller does not have the required permission.
path is empty or contains only white spaces.
The file is not found.
One or more arguments is null.
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.