ZipArchive.DeleteAsync Method
Namespace: Rebex.IO.Compression
Assembly: Rebex.Zip.dll (version 7.0.9313)
DeleteAsync(String, TraversalMode, ArchiveSaveAction, Object)
Begins asynchronous Delete operation. Deletes files and/or directories within the ZIP archive.
Declaration
public Task<ArchiveOperationResult> DeleteAsync(string archivePathOrMask, TraversalMode mode, ArchiveSaveAction action, object state = null)
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. |
| Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task<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). |
DeleteAsync(FileSet, ArchiveSaveAction, Object)
Begins asynchronous Delete operation. Deletes files and/or directories within the ZIP archive.
Declaration
public Task<ArchiveOperationResult> DeleteAsync(FileSet set, ArchiveSaveAction action, object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| FileSet | set | A filtering set which specifies external (local) files and directories to be deleted. |
| ArchiveSaveAction | action | Save action. |
| Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task<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). |