System.IO.FileAccess Enumeration

Assembly: Mscorlib.dll
Namespace: System.IO
Summary
Defines constants for read, write, or read/write access to a file.
C# Syntax:
[Flags]
[Serializable]
public enum FileAccess
Remarks
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.
Example
The following FileStream constructor grants read-only access to an existing file (FileAccess.Read).
FileStream s2 = new FileStream(name, FileMode.Open, FileAccess.Read, FileShare.Read);

    
See also:
System.IO Namespace | File | FileInfo | FileStream | IsolatedStorageFileStream

System.IO.FileAccess Member List:

Public Fields
Read Read access to the file. Data can be read from the file. Combine with Write for read/write access.
ReadWrite Read and write access to the file. Data can be written to and read from the file.
Write Write access to the file. Data can be written to the file. Combine with Read for read/write access.

Hierarchy:


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.