Xceed Zip Compression Library Documentation
PreservePaths property
Xceed Zip control reference > Xceed Zip control properties > PreservePaths property

Description

The PreservePaths property allows you to determine whether path information is stored in (or retrieved) from the zip file.

When using the Zip method, setting PreservePaths to False will cause all path information associated with a file to be discarded, and will cause only the file's filename to be stored in the zip file. Setting PreservePaths to True will cause path information to be stored in the zip file along with each file's filename. See the controlling how paths are stored topic for more information on storing paths when using the Zip method.

When using the Unzip method, or other methods that require files to be specified in the FilesToProcess property, setting PreservePaths to False will cause Xceed Zip to ignore any path information stored in the zip file. When this is done, you must specify the files to process only with filenames (no path information must be specified) otherwise no files will be matched for processing. When PreservePaths is set to True, the FilesToProcess property must contain path and filename information that matches path and filename information stored in the zip file.

Also when using the unzip method: If PreservePaths is set to True, path names that have been stored in the zip file along with each file's filename will be used to determine where the files will be unzipped to. The stored path names and files will be created inside the destination unzipping folder specified with the UnzipToFolder property. If PreservePaths is set to False, all files will be directly unzipped (without any subfolders being created) to the destination unzipping folder.

Data type

Boolean

Default value

True

Declaration (DLL API)  

BOOL XzGetPreservePaths( HXCEEDZIP hZip )

void XzSetPreservePaths( HXCEEDZIP hZip, BOOL bValue )

Applicable methods

Zip, Unzip, PreviewFiles

Related topics

None