Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ZipArchive.UpdateFile(String, String) Method

Updates content of the zip file item.

Namespace: DevExpress.Compression

Assembly: DevExpress.Docs.v24.2.dll

NuGet Package: DevExpress.Document.Processor

#Declaration

public ZipFileItem UpdateFile(
    string fileName,
    string relativePath
)

#Parameters

Name Type Description
fileName String

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

relativePath String

A string that is the path in archive.

#Returns

Type Description
ZipFileItem

A ZipFileItem object that is the updated zip file item.

#Remarks

The UpdateFile method removes a file item located at the specified path from the archive. Then, the ZipArchive creates a new zip file item from the specified file and adds it to the archive at the specified 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