Skip to main content

ZipArchive.UpdateFile(String) Method

Updates content of the zip file item.

Namespace: DevExpress.Compression

Assembly: DevExpress.Docs.v23.2.dll

NuGet Package: DevExpress.Document.Processor


public ZipFileItem UpdateFile(
    string fileName


Name Type Description
fileName String

A string that is the path to the file which will replace the file in the archive.


Type Description

A ZipFileItem object that is the updated zip file item.


The UpdateFile method removes a file item located at the path which equals the path to the file without the root component. Then, the ZipArchive creates a new zip file item from the specified file and adds it to the archive at the same path.

If an item is not found, it is created.

Use the ZipArchive.Read to load the archive to be updated. To save the updated archive, use the ZipArchive.Save method.

See Also