Indicates how to open a file when calling file-access functions.
public enum class OpenShare
public enum OpenShare
type OpenShare =
Public Enum OpenShare
|Default Default Default Default||-1||
|LockRead LockRead LockRead LockRead||2||
Other processes cannot read the file.
|LockReadWrite LockReadWrite LockReadWrite LockReadWrite||0||
Other processes cannot read or write to the file.
|LockWrite LockWrite LockWrite LockWrite||1||
Other processes cannot write to the file.
|Shared Shared Shared Shared||3||
Any process can read or write to the file.
When you call file access-related functions, you can use enumeration members in your code in place of the actual values.
OpenShare enumeration defines constants that specify whether or not other processes can access the file while your application has it open. The following table lists the
OpenShare enumeration members.
When performing file I/O operations, the
My.Computer.FileSystem object provides greater performance and ease of use than legacy file I/O methods. For more information, see FileSystem object.