Export (0) Print
Expand All
Expand Minimize

FileIOPermissionAccess Enumeration

Specifies the type of file access requested.

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

Namespace: System.Security.Permissions
Assembly: mscorlib (in mscorlib.dll)

[SerializableAttribute] 
[FlagsAttribute] 
[ComVisibleAttribute(true)] 
public enum FileIOPermissionAccess
/** @attribute SerializableAttribute() */ 
/** @attribute FlagsAttribute() */ 
/** @attribute ComVisibleAttribute(true) */ 
public enum FileIOPermissionAccess
SerializableAttribute 
FlagsAttribute 
ComVisibleAttribute(true) 
public enum FileIOPermissionAccess

 Member nameDescription
AllAccessAppend, Read, Write, and PathDiscovery access to a file or directory. AllAccess represents multiple FileIOPermissionAccess values and causes an ArgumentException when used as the access parameter for the GetPathList method, which expects a single value. 
AppendAccess to append material to a file or directory. Append access includes the ability to create a new file or directory. 
NoteNote

To create files, code must also be granted both Append and either Write or Read access. For more detail see FileMode.

NoAccessNo access to a file or directory. NoAccess represents no valid FileIOPermissionAccess values and causes an ArgumentException when used as the parameter for GetPathList, which expects a single value. 
PathDiscoveryAccess to the information in the path itself. This helps protect sensitive information in the path, such as user names, as well as information about the directory structure revealed in the path. This value does not grant access to files or folders represented by the path. 
NoteNote

For performance reasons, PathDiscovery should only be granted to directories, not to files. For example, PathDiscovery permission should be granted to paths such as C:\test and C:\test\, not C:\test\example.txt.

ReadAccess to read from a file or directory. 
WriteAccess to write to or delete a file or directory. Write access includes deleting and overwriting files or directories. 

This enumeration is used with the FileIOPermission class.

NoteNote

Although NoAccess and AllAccess appear in FileIOPermissionAccess, they are not valid for use as the parameter for GetPathList because they describe no file access types or all file access types, respectively, and GetPathList expects a single file access type.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft