FileIOPermissionAccess FileIOPermissionAccess FileIOPermissionAccess FileIOPermissionAccess Enum

定義

指定要求的檔案存取權類型。Specifies the type of file access requested.

此列舉具有 FlagsAttribute 個屬性允許以位元方式合併其成員值。

public enum class FileIOPermissionAccess
[System.Flags]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public enum FileIOPermissionAccess
type FileIOPermissionAccess = 
Public Enum FileIOPermissionAccess
繼承
FileIOPermissionAccessFileIOPermissionAccessFileIOPermissionAccessFileIOPermissionAccess
屬性

欄位

AllAccess AllAccess AllAccess AllAccess 15

具有檔案或目錄的 AppendReadWritePathDiscovery 存取權。Append, Read, Write, and PathDiscovery access to a file or directory. AllAccess 表示多重 FileIOPermissionAccess 值,並且在做為預期單一值的 ArgumentException 方法的 access 參數使用時,會造成 GetPathList(FileIOPermissionAccess)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 存取權包括建立新檔案或目錄的能力。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 表示沒有有效的 FileIOPermissionAccess 值,並且在做為預期單一值的 ArgumentException 的參數時,會造成 GetPathList(FileIOPermissionAccess)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 存取權包括刪除和覆寫檔案或目錄的能力。Write access includes deleting and overwriting files or directories.

備註

這個列舉型別會搭配FileIOPermission類別。This enumeration is used with the FileIOPermission class.

注意

雖然 NoAccess 和 AllAccess 隸屬NoAccess,不是有效的參數做GetPathList它們分別描述任何檔案存取類型或所有的檔案存取類型,因為和GetPathList必須是單一檔案存取類型。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.

注意

提供寫入權限的組件是類似於授與它完全信任。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.

適用於

另請參閱