IZipArchive.Unpack

Syntax

Unpack(Path: String);

Unpack(Path: String);

Parameters

Path. Path to the folder, to which archive must be unpacked.

Description

The Unpack method unpacks archive to the specified hard drive folder.

Example

Executing the example requires that the hard drive contains the archive: D:\Work\Archives\Data.zip.

Add a link to the IO system assembly. On working in Fore.NET, add a link to the ForeIO assembly.

Sub UserProc;
Var
    ZIP: IZipArchive;
Begin
    
//Read archive
    ZIP := New ZipArchive.Create("D:\Work\Archives\Data.zip", ZipMode.Read);
    
//Unpack archive
    ZIP.Unpack("D:\Work\NewFolder");
    
Dispose ZIP;
End Sub UserProc;

Imports Prognoz.Platform.Interop.ForeIO;

Public Shared Sub Main(Params: StartParams);
Var
    ZIP: IZipArchive = 
New ZipArchiveClass();
Begin
    
//Read archive
    ZIP.Create("D:\Work\Archives\Data.zip", ZipMode.zmRead, ZipCompressionLevel.zcDefaultCompression);
    
//Unpack archive
    ZIP.Unpack("D:\Work\NewFolder");
    System.Runtime.InteropServices.Marshal.ReleaseComObject(ZIP);
End Sub;

After executing the example the archive is unpacked to the specified folder.

See also:

IZipArchive