FileInfo.Open Method (FileMode, FileAccess, FileShare)
Opens a file in the specified mode with read, write, or read/write access and the specified sharing option.
Assembly: mscorlib (in mscorlib.dll)
'Declaration Public Function Open ( _ mode As FileMode, _ access As FileAccess, _ share As FileShare _ ) As FileStream
- 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 Nothing.
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.