Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FileIOPermissionAccess Enumeration

Specifies the type of file access requested.

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

[Visual Basic]
Public Enum FileIOPermissionAccess
public enum FileIOPermissionAccess
__value public enum FileIOPermissionAccess
enum FileIOPermissionAccess


This enumeration is used with the FileIOPermission class.

Note   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.


Member name Description Value
AllAccess Append, 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. 15
Append Access to append material to a file or directory. Append access includes the ability to create a new file or directory.
Note   To create files, code must also be granted both Append and either Write or Read access. For more detail see FileMode.
NoAccess No 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. 0
PathDiscovery Access 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.
Note   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.
Read Access to read from a file or directory. 1
Write Access to write to or delete a file or directory. Write access includes deleting and overwriting files or directories. 2


Namespace: System.Security.Permissions

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Mscorlib (in Mscorlib.dll)

See Also

System.Security.Permissions Namespace | FileIOPermission | FileIOPermissionAttribute

© 2017 Microsoft