XarArchive.DeleteEntry
XarArchive.DeleteEntry method
Removes the first occurrence of a specific entry from the entries list.
public XarArchive DeleteEntry(XarEntry entry)
Parameter | Type | Description |
---|---|---|
entry | XarEntry | The entry to remove from the entries list. |
Return Value
Xar entry instance.
Exceptions
exception | condition |
---|---|
ArgumentNullException | entry is null. |
Examples
Here is how you can remove all entries except the last one:
using (var archive = new XarArchive("archive.xar"))
{
while (archive.Entries.Count > 1)
archive.DeleteEntry(archive.Entries.FirstOrDefault());
archive.Save(outputXarFile);
}
See Also
- class XarEntry
- class XarArchive
- namespace Aspose.Zip.Xar
- assembly Aspose.Zip