Skip to main content

ZipArchive.UpdateDirectory(String) Method

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

Namespace: DevExpress.Compression

Assembly: DevExpress.Docs.v24.1.dll

NuGet Package: DevExpress.Document.Processor

Declaration

public ZipDirectoryItem UpdateDirectory(
    string path
)

Parameters

Name Type Description
path String

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

Returns

Type Description
ZipDirectoryItem

Currently, always returns null.

Remarks

The UpdateDirectory method recursively traverses all directories starting from the specified path. For each file, it calls the ZipArchive.UpdateFile method so that the archive path equals the file path without the root component. 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 a zip 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