Skip to main content
.NET Framework 4.5.2+

ZipArchive.UpdateDirectory(String, String) Method

Recursively updates files and nested directories starting from the specified directory.

Namespace: DevExpress.Compression

Assembly: DevExpress.Docs.v22.2.dll


public ZipDirectoryItem UpdateDirectory(
    string path,
    string archivePath


Name Type Description
path String

A string that is the path to a directory from which the update starts.

archivePath String

A string that is the path in the archive.


Type Description

Currently, always returns null.


The UpdateDirectory method recursively traverses all directories starting from the specified path. For each file, it calls the ZipArchive.UpdateFile method. As a result, all file items in the archive which correspond to files in the file system are replaced with new items created from files. If an item that corresponds to the file is not found, it is created and added to the archive. All file items which do not correspond to files are left intact.

Empty directories are skipped and not created in the archive.

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

See Also