FileIOPermissionAttribute.All 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注意
现已弃用此 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()
注解
此属性设置单个文件或目录的访问权限。 使用其他属性指定其他文件和目录。