PowerTCP Zip Compression for .NET
Overwrite Property (Archive)
Example 




Gets or sets a value which determines how files are overwritten when decompressing files.
Syntax
<DefaultValueAttribute()>
<CategoryAttribute("Archive")>
<DescriptionAttribute("Specifies whether to overwrite files when unzipping.")>
Public Property Overwrite As Overwrite
Dim instance As Archive
Dim value As Overwrite
 
instance.Overwrite = value
 
value = instance.Overwrite
[DefaultValue()]
[Category("Archive")]
[Description("Specifies whether to overwrite files when unzipping.")]
public Overwrite Overwrite {get; set;}
[DefaultValue()]
[Category("Archive")]
[Description("Specifies whether to overwrite files when unzipping.")]
public: __property Overwrite get_Overwrite();
public: __property void set_Overwrite( 
   Overwrite value
);
[DefaultValue()]
[Category("Archive")]
[Description("Specifies whether to overwrite files when unzipping.")]
public:
property Overwrite Overwrite {
   Overwrite get();
   void set (    Overwrite value);
}

Property Value

An Overwrite value specifying how to overwrite files. The default value is Overwrite.Never, indicating files are not overwritten.
Remarks

This property is only used when the destination parameter of the Archive.Unzip or Archive.QuickUnzip specifies a destination directory.

This property is only used for decompression.

Example
The following example demonstrates using QuickUnzip and specifying specific options. Only QuickUnzip is required in this operation.
' Be sure to import the namespace by putting "Imports Dart.PowerTCP.Zip"
' at the top of your class.

' Preserve the path when unzipping
Archive1.PreservePath = True

' Overwrite any existing files
Archive1.Overwrite = Overwrite.Always

' Unzip all the files to c:\test
Archive1.QuickUnzip("c:\test.zip", "c:\Test")
// Be sure to import the namespace by putting "using Dart.PowerTCP.Zip;"
// at the top of your class.

// Preserve the path when unzipping
archive1.PreservePath = true;

// Overwrite any existing files
archive1.Overwrite = Overwrite.Always;

// Unzip all the files to c:\test
archive1.QuickUnzip("c:\\test.zip", "c:\\Test");
See Also

Reference

Archive Class
Archive Members


PowerTCP Zip for .NET Documentation Version 2.1.1
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic