Method Open
Open(string, FileMode)
Opens a Stream on the specified path with read/write access with no sharing.
public virtual Stream Open(string path, FileMode mode)
Parameters
pathstringThe file to open.
modeFileModeA 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.
public virtual Stream Open(string path, FileMode mode, FileAccess access)
Parameters
pathstringThe file to open.
modeFileModeA 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.
accessFileAccessA 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.
public virtual Stream Open(string path, FileMode mode, FileAccess access, FileShare share)
Parameters
pathstringThe file to open.
modeFileModeA 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.
accessFileAccessA FileAccess value that specifies the operations that can be performed on the file.
shareFileShareA FileShare value specifying the type of access other threads have to the file.