QGIS API Documentation
3.2.0-Bonn (bc43194)
|
Functions | |
CORE_EXPORT bool | isZipFile (const QString &filename) |
Returns true if the file name is a zipped file ( i.e with a '.qgz' extension, false otherwise. More... | |
CORE_EXPORT bool | unzip (const QString &zip, const QString &dir, QStringList &files) |
Unzip a zip file in an output directory. More... | |
CORE_EXPORT bool | zip (const QString &zip, const QStringList &files) |
Zip the list of files in the zip file. More... | |
bool QgsZipUtils::isZipFile | ( | const QString & | filename | ) |
Returns true if the file name is a zipped file ( i.e with a '.qgz' extension, false otherwise.
filename | The name of the file |
Definition at line 28 of file qgsziputils.cpp.
bool QgsZipUtils::unzip | ( | const QString & | zip, |
const QString & | dir, | ||
QStringList & | files | ||
) |
Unzip a zip file in an output directory.
An error is returned if the zip filename does not exist, the output directory does not exist or is not writable.
zip | The zip filename |
dir | The output directory |
files | The absolute path of unzipped files |
Definition at line 33 of file qgsziputils.cpp.
bool QgsZipUtils::zip | ( | const QString & | zip, |
const QStringList & | files | ||
) |
Zip the list of files in the zip file.
If the zip file already exists or is empty, an error is returned. If an input file does not exist, an error is also returned.
zip | The zip filename |
files | The absolute path to files to embed within the zip |
Definition at line 121 of file qgsziputils.cpp.