FileIOPermissionAttribute.Append 属性

定义

获取或设置对字符串值所指定的文件或目录的追加访问权限。

public:
 property System::String ^ Append { System::String ^ get(); void set(System::String ^ value); };
public string Append { get; set; }
member this.Append : string with get, set
Public Property Append As String

属性值

用于追加访问的文件或目录的绝对路径。

示例

下面的代码示例设置 Append 属性以授予 Append 对指定目录中文件的访问权限。

// Set the Append property.
[FileIOPermissionAttribute(SecurityAction::PermitOnly,
Append="C:\\Documents and Settings\\All Users\\Application Data")]
// Set the Append property.
[FileIOPermissionAttribute(SecurityAction.PermitOnly,
     Append = "C:\\Documents and Settings\\All Users\\Application Data")]
' 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()

注解

此属性设置单个文件或目录的访问权限。 使用其他属性指定其他文件和目录。

适用于