IZipArchiveEntry.Remove

Syntax

Remove;

Description

The Remove method removes the current element from archive.

Example

Executing the example requires the archive: D:\Work\Archives\Data.zip. The Old folder is added to the archive.

Add a link to the IO system assembly.

Sub UserProc;
Var
    ZIP: IZipArchive;
    ZIPEntry: IZipArchiveEntry;
Begin
    ZIP := New ZipArchive.Create("D:\Work\Archives\Data.zip", ZipMode.Update);
    ZIPEntry := ZIP.ItemByName("Old/");
    If Not IsNull(ZIPEntry) Then
        ZIPEntry.Remove;
    End If;
    Dispose ZIP;
End Sub UserProc;

After executing the example the Old folder is removed from the Data.zip archive.

See also:

IZipArchiveEntry