FileIOPermission.GetPathList(FileIOPermissionAccess) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets all files and directories with the specified FileIOPermissionAccess.
public:
cli::array <System::String ^> ^ GetPathList(System::Security::Permissions::FileIOPermissionAccess access);
public string[] GetPathList(System.Security.Permissions.FileIOPermissionAccess access);
member this.GetPathList : System.Security.Permissions.FileIOPermissionAccess -> string[]
Public Function GetPathList (access As FileIOPermissionAccess) As String()
Parameters
- access
- FileIOPermissionAccess
One of the 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.
Exceptions
access is not a valid value of FileIOPermissionAccess.
-or-
access is AllAccess, which represents more than one type of file access, or NoAccess, which does not represent any type of file access.
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 FileIOPermissionAccess, which represent single types of file access. Those values are Read, Write, Append, and PathDiscovery. The values acceptable to access do not include NoAccess and AllAccess, which do not represent single types of file access.