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

ZipArchive.DeleteFile Method

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

DeleteFile(String)

Deletes a file within the ZIP archive.

Declaration
public ArchiveOperationResult DeleteFile(string archiveFilePath)
Parameters
Type Name Description
String archiveFilePath

Path to an archive file.

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. -or- The specified path is not a file.

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).

DeleteFile(String, ArchiveSaveAction)

Deletes a file within the ZIP archive.

Declaration
public ArchiveOperationResult DeleteFile(string archiveFilePath, ArchiveSaveAction action)
Parameters
Type Name Description
String archiveFilePath

Path to an archive file.

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.

InvalidOperationException

Archive is not opened for writing. -or- The specified path is not a file.

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).

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