<PackageReference Include="System.Security.Permissions" Version="9.0.0-rc.1.24431.7" />

FileIOPermissionAccess

Specifies the type of file access requested.
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 method, which expects a single value.

Append = 4

Access to append material to a file or directory. FileIOPermissionAccess.Append access includes the ability to create a new file or directory. To create files, code must also be granted bothAppend and either Write or Read access.

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.

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.

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

Access to read from a file or directory.

Write = 2

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