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.AddDirectory(String, String) Method

Recursively add files and directories to the archive.

Namespace: DevExpress.Compression

Assembly: DevExpress.Docs.v24.2.dll

NuGet Package: DevExpress.Document.Processor

#Declaration

public ZipDirectoryItem AddDirectory(
    string path,
    string archivePath
)

#Parameters

Name Type Description
path String

A string that is the path to a directory which will be included in the archive.

archivePath String

A string that is the path in the archive.

#Returns

Type Description
ZipDirectoryItem

A ZipDirectoryItem that is the zip item container for the directory. Currently, the method always returns null.

#Remarks

The AddDirectory

recursively collects all files and folders starting from the folder specified by the path parameter. The tree of directories and files is added to the archive directory specified by the archivePath parameter. If the archivePath parameter is set to “/“, the tree is added to the archive root. If the archivePath parameter is null, the last component of a path is used as the name of the archive directory in which a tree is built .

See Also