共用方式為


FileIOPermissionAttribute.All 屬性

定義

警告

此 API 現已淘汰。

警告

Please use the ViewAndModify property instead.

取得或設定字串值所指定檔案或目錄的完整存取權。

public:
 property System::String ^ All { System::String ^ get(); void set(System::String ^ value); };
[System.Obsolete]
public string All { get; set; }
public string All { get; set; }
[System.Obsolete("Please use the ViewAndModify property instead.")]
public string All { get; set; }
[<System.Obsolete>]
member this.All : string with get, set
member this.All : string with get, set
[<System.Obsolete("Please use the ViewAndModify property instead.")>]
member this.All : string with get, set
Public Property All As String

屬性值

完全存取權的檔案或目錄絕對路徑。

屬性

例外狀況

此屬性不支援 get 方法。

範例

下列程式代碼範例會 All 設定 屬性,以授與指定目錄的完整存取權。

// Set the All property.
[FileIOPermissionAttribute(SecurityAction::PermitOnly,
All="C:\\Documents and Settings\\All Users\\Application Data\\Microsoft\\Network")]
// Set the All property.
[FileIOPermissionAttribute(SecurityAction.PermitOnly,
     All = "C:\\Documents and Settings\\All Users\\Application Data\\Microsoft\\Network")]
' Set the Read, PathDiscovery, Append, Write, and All properties.
<FileIOPermissionAttribute(SecurityAction.PermitOnly, Read:="C:\"), _
FileIOPermissionAttribute(SecurityAction.PermitOnly, _
PathDiscovery:="C:\Documents and Settings\All Users"), _
FileIOPermissionAttribute(SecurityAction.PermitOnly, _
Append:="C:\Documents and Settings\All Users\Application Data"), _
FileIOPermissionAttribute(SecurityAction.PermitOnly, _
    Write:="C:\Documents and Settings\All Users\Application Data\Microsoft"), _
FileIOPermissionAttribute(SecurityAction.PermitOnly, _
    All:="C:\Documents and Settings\All Users\Application Data\Microsoft\Network")> _
Public Shared Sub PermitOnlyMethod()

備註

此屬性會設定單一檔案或目錄的存取權。 使用其他屬性來指定其他檔案和目錄。

適用於