FileIOPermissionAccess FileIOPermissionAccess FileIOPermissionAccess FileIOPermissionAccess Enum

Definition

Specifies the type of file access requested.

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

public enum class FileIOPermissionAccess
[System.Flags]
[System.Runtime.InteropServices.ComVisible(true)]
[Serializable]
public enum FileIOPermissionAccess
type FileIOPermissionAccess = 
Public Enum FileIOPermissionAccess
Inheritance
FileIOPermissionAccessFileIOPermissionAccessFileIOPermissionAccessFileIOPermissionAccess
Attributes
FlagsAttribute ComVisibleAttribute SerializableAttribute

Fields

AllAccess AllAccess AllAccess AllAccess 15

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(FileIOPermissionAccess) method, which expects a single value.

Append Append Append Append 4

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

NoAccess NoAccess NoAccess NoAccess 0

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

PathDiscovery PathDiscovery PathDiscovery PathDiscovery 8

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 Read Read Read 1

Access to read from a file or directory.

Write Write Write Write 2

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

Remarks

This enumeration is used with the FileIOPermission class.

Note

Although NoAccess and AllAccess are members of NoAccess, 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.

Note

Giving 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 Write access.

Applies to

See Also