Method Open
Open(string, FileMode)
Opens a Stream on the specified path with read/write access with no sharing.
Stream Open(string path, FileMode mode)
Parameters
path
stringThe file to open.
mode
FileModeA FileMode value that specifies whether a file is created if one does not exist. Also determines whether the contents of existing file is retained or overwritten.
Returns
Open(string, FileMode, FileAccess)
Opens a Stream on the specified path, with the specified mode and access with no sharing.
Stream Open(string path, FileMode mode, FileAccess access)
Parameters
path
stringThe file to open.
mode
FileModeA FileMode value that specifies whether a file is created if one does not exist. Also determines whether the contents of existing file is retained or overwritten.
access
FileAccessA FileAccess value that specifies the operations that can be performed on the file.
Returns
Open(string, FileMode, FileAccess, FileShare)
Opens a Stream on the specified path, having the specified mode with read, write, or read/write access and the specified sharing option.
Stream Open(string path, FileMode mode, FileAccess access, FileShare share)
Parameters
path
stringThe file to open.
mode
FileModeA FileMode value that specifies whether a file is created if one does not exist. Also determines whether the contents of existing file is retained or overwritten.
access
FileAccessA FileAccess value that specifies the operations that can be performed on the file.
share
FileShareA FileShare value specifying the type of access other threads have to the file.