System.Security.Permissions.FileIOPermission.GetPathList Method

Gets all files and directories with the specified System.Security.Permissions.FileIOPermissionAccess.

Syntax

public string[] GetPathList (FileIOPermissionAccess access)

Parameters

access
One of the System.Security.Permissions.FileIOPermissionAccess values that represents a single type of file access.

Returns

An array containing the paths of the files and directories to which access specified by the access parameter is granted.

Remarks

Use this method to get the state of the current permission. To get the state of both Read and Write access, two calls to this method are required.

Note:

The access parameter is limited to the values of System.Security.Permissions.FileIOPermissionAccess, which represent single types of file access. Those values are FileIOPermissionAccess.Read, FileIOPermissionAccess.Write, FileIOPermissionAccess.Append, and FileIOPermissionAccess.PathDiscovery. The values acceptable to access do not include FileIOPermissionAccess.NoAccess and FileIOPermissionAccess.AllAccess, which do not represent single types of file access.

Requirements

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