Udostępnij za pośrednictwem


OpenAccess Enumeration

Indicates how to open a file when calling file-access functions.

Remarks

When you call file access-related functions, you can use enumeration members in your code in place of the actual values.

The OpenAccess enumeration defines constants used to identify whether a file can be read from (Read), written to (Write), or both (ReadWrite). A file opened for Read access cannot be modified, only read from. The following table lists the OpenAccess 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 My.Computer.FileSystem Object.

Members

Member

Description

Default

Read and write access permitted. This is the default.

Read

Read access permitted.

ReadWrite

Read and write access permitted.

Write

Write access permitted.

Requirements

Namespace: Microsoft.VisualBasic

Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)

See Also

Tasks

How to: Refer to an Enumeration Member

Concepts

Intrinsic Constants and Enumerations

When to Use an Enumeration

Reference

OpenMode Enumeration

OpenShare Enumeration