FileIOPermissionAttribute.All 属性

定义

注意

此 API 现已过时。

注意

Please use the ViewAndModify property instead.

注意

use newer properties

获取或设置对字符串值所指定的文件或目录的完全访问权限。Gets or sets full access for the file or directory that is specified by the string value.

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("use newer properties")]
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
[<System.Obsolete("use newer properties")>]
member this.All : string with get, set
Public Property All As String

属性值

String

用于完全访问的文件或目录的绝对路径。The absolute path of the file or directory for full access.

属性

例外

此属性不支持 get 方法。The get method is not supported for this property.

示例

下面的代码示例将 All 属性设置为授予对指定目录的完全访问权限。The following code example sets the All property to grant full access to the specified directory.

// 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()

注解

此属性设置单个文件或目录的访问权限。This property sets access for a single file or directory. 使用其他属性来指定其他文件和目录。Use additional attributes to specify additional files and directories.

适用于