OpenAccess 枚举

定义

指示调用文件访问函数时如何打开文件。Indicates how to open a file when calling file-access functions.

public enum class OpenAccess
public enum OpenAccess
type OpenAccess = 
Public Enum OpenAccess
继承
OpenAccess

字段

Default -1

允许读写访问。Read and write access permitted. 这是默认设置。This is the default.

Read 1

允许读访问。Read access permitted.

ReadWrite 3

允许读写访问。Read and write access permitted.

Write 2

允许写访问。Write access permitted.

注解

调用文件访问相关的函数时, 可以在代码中使用枚举成员来代替实际值。When you call file access-related functions, you can use enumeration members in your code in place of the actual values.

枚举定义了用于标识文件是否可以读取 (Read)、写入 (Write) 或两者 (ReadWrite) 的常量。 OpenAccessThe OpenAccess enumeration defines constants used to identify whether a file can be read from (Read), written to (Write), or both (ReadWrite). 无法修改为Read访问而打开的文件, 只能从读取。A file opened for Read access cannot be modified, only read from. 下表列出OpenAccess了枚举成员。The following table lists the OpenAccess enumeration members.

执行文件 i/o 操作时, My.Computer.FileSystem对象可提供比旧的文件 i/o 方法更好的性能和易用性。When performing file I/O operations, the My.Computer.FileSystem object provides greater performance and ease of use than legacy file I/O methods. 有关详细信息, 请FileSystem参阅对象。For more information, see FileSystem object.

适用于

另请参阅