System.Security.Permissions.FileIOPermissionAccess Enumeration

Specifies the type of file access requested.

Syntax

[System.Flags]
[System.Runtime.InteropServices.ComVisible(true)]
public enum FileIOPermissionAccess

Remarks

This enumeration is used with the System.Security.Permissions.FileIOPermission class.

Note:

Although FileIOPermissionAccess.NoAccess and FileIOPermissionAccess.AllAccess are members of System.Security.Permissions.FileIOPermissionAccess, they are not valid for use as the parameter for FileIOPermission.GetPathList(FileIOPermissionAccess) because they describe no file access types or all file access types, respectively, and FileIOPermission.GetPathList(FileIOPermissionAccess) expects a single file access type.

Note:

Giving FileIOPermissionAccess.Write access to an assembly is similar to granting it Full Trust. If an application should not write to the file system it should not have FileIOPermissionAccess.Write access.

Members

Member NameDescription
AllAccess

FileIOPermissionAccess.Append, FileIOPermissionAccess.Read, FileIOPermissionAccess.Write, and FileIOPermissionAccess.PathDiscovery access to a file or directory. FileIOPermissionAccess.AllAccess represents multiple System.Security.Permissions.FileIOPermissionAccess values and causes an ArgumentException when used as the access parameter for the FileIOPermission.GetPathList(FileIOPermissionAccess) method, which expects a single value.

Append

Access to append material to a file or directory. FileIOPermissionAccess.Append access includes the ability to create a new file or directory.

NoAccess

No access to a file or directory. FileIOPermissionAccess.NoAccess represents no valid System.Security.Permissions.FileIOPermissionAccess values and causes an ArgumentException when used as the parameter for FileIOPermission.GetPathList(FileIOPermissionAccess), which expects a single value.

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.

Read

Access to read from a file or directory.

Write

Access to write to or delete a file or directory. FileIOPermissionAccess.Write access includes deleting and overwriting files or directories.

Requirements

Namespace: System.Security.Permissions
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0