API Reference > ZipUtils Namespace > Functions > ZipUtils::zipToFile Function
ZipUtils::zipToFile Function
Syntax
C++
OdResult zipToFile(const OdString & targetFile, const OdString & filesDir, bool overwriteTargetFile = true);

ZipUtils.h

Parameters 
Description 
const OdString & targetFile 
[in] A string containing path to the target zip file.  
const OdString & filesDir 
[in] A string containing name of the source directory.  
bool overwriteTargetFile = true 
[in] Return error if false and target file exists; otherwise, overwrite target file.  

Returns appropriate error code.

Zips directory to file.

Copyright (c) 2002-2021. Open Design Alliance. All rights reserved.