FileAccess Enumeration

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Defines constants for read, write, or read/write access to a file.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:  System.IO
Assembly:  System.IO (in System.IO.dll)

public enum FileAccess

Member nameDescription
ReadRead access to the file. Data can be read from the file. Combine with Write for read/write access.
WriteWrite access to the file. Data can be written to the file. Combine with Read for read/write access.
ReadWriteRead and write access to the file. Data can be written to and read from the file.

A FileAccess parameter is specified in many of the constructors for File, FileInfo, FileStream, and other constructors where it is important to control the kind of access users have to a file.