ZipArchive.Delete Method
Namespace: Rebex.IO.Compression
Assembly: Rebex.Zip.dll (version 7.0.9313)
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 |
|---|---|
| Archive |
Operation result. |
Exceptions
| Type | Condition |
|---|---|
| Argument |
The specified path is null. |
| Argument |
The specified path is empty. -or- Illegal use of wildcards in path. |
| Invalid |
Archive is not opened for writing. |
| Object |
Archive was already disposed. |
| IOException | An I/O error occurred. |
| Zip |
Cannot perform the requested operation, or the operation was canceled
(see Problem |
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). |
| Traversal |
mode | Traversal mode. |
Returns
| Type | Description |
|---|---|
| Archive |
Operation result. |
Exceptions
| Type | Condition |
|---|---|
| Argument |
The specified path is null. |
| Argument |
The specified path is empty. -or- Illegal use of wildcards in path. -or- Ambiguous usage of path and mode. |
| Argument |
The |
| Invalid |
Archive is not opened for writing. |
| Object |
Archive was already disposed. |
| IOException | An I/O error occurred. |
| Zip |
Cannot perform the requested operation, or the operation was canceled
(see Problem |
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). |
| Traversal |
mode | Traversal mode. |
| Archive |
action | Save action. |
Returns
| Type | Description |
|---|---|
| Archive |
Operation result. |
Exceptions
| Type | Condition |
|---|---|
| Argument |
The specified path is null. |
| Argument |
The specified path is empty. -or- Illegal use of wildcards in path. -or- Ambiguous usage of path and mode. |
| Argument |
The |
| Invalid |
Archive is not opened for writing. |
| Object |
Archive was already disposed. |
| IOException | An I/O error occurred. |
| Zip |
Cannot perform the requested operation, or the operation was canceled
(see Problem |
Delete(FileSet)
Deletes files and/or directories within the ZIP archive.
Declaration
public ArchiveOperationResult Delete(FileSet set)
Parameters
| Type | Name | Description |
|---|---|---|
| File |
set | A filtering set which specifies external (local) files and directories to be deleted. |
Returns
| Type | Description |
|---|---|
| Archive |
Operation result. |
Exceptions
| Type | Condition |
|---|---|
| Argument |
|
| Argument |
Base path of the set contains invalid characters. |
| Invalid |
Archive is not opened for writing. |
| Object |
Archive was already disposed. |
| IOException | An I/O error occurred. |
| Zip |
Cannot perform the requested operation, or the operation was canceled
(see Problem |
Delete(FileSet, ArchiveSaveAction)
Deletes files and/or directories within the ZIP archive.
Declaration
public ArchiveOperationResult Delete(FileSet set, ArchiveSaveAction action)
Parameters
| Type | Name | Description |
|---|---|---|
| File |
set | A filtering set which specifies external (local) files and directories to be deleted. |
| Archive |
action | Save action. |
Returns
| Type | Description |
|---|---|
| Archive |
Operation result. |
Exceptions
| Type | Condition |
|---|---|
| Argument |
|
| Argument |
Base path of the set contains invalid characters. |
| Invalid |
Archive is not opened for writing. |
| Object |
Archive was already disposed. |
| IOException | An I/O error occurred. |
| Zip |
Cannot perform the requested operation, or the operation was canceled
(see Problem |
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 |
|---|---|
| Archive |
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). |
| Traversal |
mode | Traversal mode. |
Returns
| Type | Description |
|---|---|
| Archive |
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). |
| Archive |
action | A save action. |
Returns
| Type | Description |
|---|---|
| Archive |
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). |
| Traversal |
mode | Traversal mode. |
| Archive |
action | A save action. |
Returns
| Type | Description |
|---|---|
| Archive |
Operation result. |