Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

ZipArchive.Delete Method

Namespace: Rebex.IO.Compression
Assembly: Rebex.Zip.dll (version 7.0.9147)

Delete(String)

Deletes files and/or empty directories within the ZIP archive.

Declaration
public ArchiveOperationResult Delete(string archivePathOrMask)
Parameters
Type Name Description
String archivePathOrMask

Path (with or without a mask) to an archive item(s).

Returns
Type Description
ArchiveOperationResult

Operation result.

Exceptions
Type Condition
ArgumentNullException

The specified path is null.

ArgumentException

The specified path is empty. -or- Illegal use of wildcards in path.

InvalidOperationException

Archive is not opened for writing.

ObjectDisposedException

Archive was already disposed.

IOException

An I/O error occurred.

ZipException

Cannot perform the requested operation, or the operation was canceled (see ProblemType for detailed information).

Delete(String, TraversalMode)

Deletes files and/or directories within the ZIP archive.

Declaration
public ArchiveOperationResult Delete(string archivePathOrMask, TraversalMode mode)
Parameters
Type Name Description
String archivePathOrMask

Path (with or without a mask) to an archive item(s).

TraversalMode mode

Traversal mode.

Returns
Type Description
ArchiveOperationResult

Operation result.

Exceptions
Type Condition
ArgumentNullException

The specified path is null.

ArgumentException

The specified path is empty. -or- Illegal use of wildcards in path. -or- Ambiguous usage of path and mode.

ArgumentOutOfRangeException

The mode specified an invalid value.

InvalidOperationException

Archive is not opened for writing.

ObjectDisposedException

Archive was already disposed.

IOException

An I/O error occurred.

ZipException

Cannot perform the requested operation, or the operation was canceled (see ProblemType for detailed information).

Delete(String, TraversalMode, ArchiveSaveAction)

Deletes files and/or directories within the ZIP archive.

Declaration
public ArchiveOperationResult Delete(string archivePathOrMask, TraversalMode mode, ArchiveSaveAction action)
Parameters
Type Name Description
String archivePathOrMask

Path (with or without a mask) to an archive item(s).

TraversalMode mode

Traversal mode.

ArchiveSaveAction action

Save action.

Returns
Type Description
ArchiveOperationResult

Operation result.

Exceptions
Type Condition
ArgumentNullException

The specified path is null.

ArgumentException

The specified path is empty. -or- Illegal use of wildcards in path. -or- Ambiguous usage of path and mode.

ArgumentOutOfRangeException

The mode or action specified an invalid value.

InvalidOperationException

Archive is not opened for writing.

ObjectDisposedException

Archive was already disposed.

IOException

An I/O error occurred.

ZipException

Cannot perform the requested operation, or the operation was canceled (see ProblemType for detailed information).

Delete(FileSet)

Deletes files and/or directories within the ZIP archive.

Declaration
public ArchiveOperationResult Delete(FileSet set)
Parameters
Type Name Description
FileSet set

A filtering set which specifies external (local) files and directories to be deleted.

Returns
Type Description
ArchiveOperationResult

Operation result.

Exceptions
Type Condition
ArgumentNullException

set is null.

ArgumentException

Base path of the set contains invalid characters.

InvalidOperationException

Archive is not opened for writing.

ObjectDisposedException

Archive was already disposed.

IOException

An I/O error occurred.

ZipException

Cannot perform the requested operation, or the operation was canceled (see ProblemType for detailed information).

Delete(FileSet, ArchiveSaveAction)

Deletes files and/or directories within the ZIP archive.

Declaration
public ArchiveOperationResult Delete(FileSet set, ArchiveSaveAction action)
Parameters
Type Name Description
FileSet set

A filtering set which specifies external (local) files and directories to be deleted.

ArchiveSaveAction action

Save action.

Returns
Type Description
ArchiveOperationResult

Operation result.

Exceptions
Type Condition
ArgumentNullException

set is null.

ArgumentException

Base path of the set contains invalid characters.

InvalidOperationException

Archive is not opened for writing.

ObjectDisposedException

Archive was already disposed.

IOException

An I/O error occurred.

ZipException

Cannot perform the requested operation, or the operation was canceled (see ProblemType for detailed information).

Delete(String, String)

Deletes files and/or empty directories from the specified ZIP archive.

Declaration
public static ArchiveOperationResult Delete(string zipFilePath, string archivePathOrMask)
Parameters
Type Name Description
String zipFilePath

Path to a ZIP archive file.

String archivePathOrMask

Path (with or without a mask) to an archive item(s).

Returns
Type Description
ArchiveOperationResult

Operation result.

Delete(String, String, TraversalMode)

Deletes files and/or directories from the specified ZIP archive.

Declaration
public static ArchiveOperationResult Delete(string zipFilePath, string archivePathOrMask, TraversalMode mode)
Parameters
Type Name Description
String zipFilePath

Path to a ZIP archive file.

String archivePathOrMask

Path (with or without a mask) to an archive item(s).

TraversalMode mode

Traversal mode.

Returns
Type Description
ArchiveOperationResult

Operation result.

Delete(String, String, ArchiveSaveAction)

Deletes files and/or empty directories from the specified ZIP archive.

Declaration
public static ArchiveOperationResult Delete(string zipFilePath, string archivePathOrMask, ArchiveSaveAction action)
Parameters
Type Name Description
String zipFilePath

Path to a ZIP archive file.

String archivePathOrMask

Path (with or without a mask) to an archive item(s).

ArchiveSaveAction action

A save action.

Returns
Type Description
ArchiveOperationResult

Operation result.

Delete(String, String, TraversalMode, ArchiveSaveAction)

Deletes files and/or directories from the specified ZIP archive.

Declaration
public static ArchiveOperationResult Delete(string zipFilePath, string archivePathOrMask, TraversalMode mode, ArchiveSaveAction action)
Parameters
Type Name Description
String zipFilePath

Path to a ZIP archive file.

String archivePathOrMask

Path (with or without a mask) to an archive item(s).

TraversalMode mode

Traversal mode.

ArchiveSaveAction action

A save action.

Returns
Type Description
ArchiveOperationResult

Operation result.

In This Article
  • Delete(String)
  • Delete(String, TraversalMode)
  • Delete(String, TraversalMode, ArchiveSaveAction)
  • Delete(FileSet)
  • Delete(FileSet, ArchiveSaveAction)
  • Delete(String, String)
  • Delete(String, String, TraversalMode)
  • Delete(String, String, ArchiveSaveAction)
  • Delete(String, String, TraversalMode, ArchiveSaveAction)
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies