ZipArchive.Delete Method
Namespace: Rebex.IO.Compression
Assembly: Rebex.Zip.dll (version 7.0.9119)
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 |
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 |
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 |
|
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 |
|
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. |