2017-07-07 21:06:22 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsziputils.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%ModuleHeaderCode
|
|
|
|
#include "qgsziputils.h"
|
|
|
|
%End
|
|
|
|
|
|
|
|
namespace QgsZipUtils
|
|
|
|
{
|
|
|
|
|
2017-07-17 16:58:01 +01:00
|
|
|
bool isZipFile( const QString &filename );
|
|
|
|
%Docstring
|
2019-02-26 19:54:09 +10:00
|
|
|
Returns ``True`` if the file name is a zipped file ( i.e with a '.qgz'
|
|
|
|
extension, ``False`` otherwise.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param filename: The name of the file
|
|
|
|
|
2019-02-26 19:54:09 +10:00
|
|
|
:return: ``True`` if the file is zipped, ``False`` otherwise
|
2017-07-17 16:58:01 +01:00
|
|
|
%End
|
|
|
|
|
2017-07-07 21:06:22 +02:00
|
|
|
bool unzip( const QString &zip, const QString &dir, QStringList &files /Out/ );
|
|
|
|
%Docstring
|
2018-12-19 08:04:27 -04:00
|
|
|
Unzip a zip file in an output directory.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param zip: The zip filename
|
|
|
|
:param dir: The output directory
|
|
|
|
|
2019-02-26 19:54:09 +10:00
|
|
|
:return: - ``False`` if the zip filename does not exist, the output directory
|
2019-02-04 08:26:11 +10:00
|
|
|
- files: The absolute path of unzipped files
|
2018-12-19 08:04:27 -04:00
|
|
|
does not exist or is not writable.
|
|
|
|
|
2017-07-07 21:06:22 +02:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
2019-05-16 13:15:07 +02:00
|
|
|
bool zip( const QString &zip, const QStringList &files );
|
2017-07-07 21:06:22 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
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.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param zip: The zip filename
|
|
|
|
:param files: The absolute path to files to embed within the zip
|
|
|
|
|
2017-07-07 21:06:22 +02:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
};
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsziputils.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|