This documentation is archived and is not being maintained.

FileIOPermissionAttribute.Append Property

Gets or sets append access for the file or directory specified by the string value.

[Visual Basic]
Public Property Append As String
[C#]
public string Append {get; set;}
[C++]
public: __property String* get_Append();
public: __property void set_Append(String*);
[JScript]
public function get Append() : String;
public function set Append(String);

Property Value

The absolute path of the file or directory for append access.

Remarks

This property sets access for a single file or directory. Use additional attributes to specify additional files and directories.

Example

[Visual Basic] 
' 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()

[C#] 
// Set the Append property.
[FileIOPermissionAttribute(SecurityAction.PermitOnly, 
     Append = "C:\\Documents and Settings\\All Users\\Application Data")]

[C++] 
// Set the Append property.
[FileIOPermissionAttribute(SecurityAction::PermitOnly, 
                           Append = S"C:\\Documents and Settings\\All Users\\Application Data")]

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Common Language Infrastructure (CLI) Standard

See Also

FileIOPermissionAttribute Class | FileIOPermissionAttribute Members | System.Security.Permissions Namespace

Show: