Class: QgsProjectArchive

class qgis.core.QgsProjectArchive

Bases: QgsArchive

Class allowing to manage the zip/unzip actions on project file

New in version 3.0:

Methods

auxiliaryStorageFile

Returns the current .qgd auxiliary storage file or an empty string if there's none

clearProjectFile

Remove the current .qgs project file from the temporary directory.

projectFile

Returns the current .qgs project file or an empty string if there's none

unzip

Clear the current content of this archive and unzip.

auxiliaryStorageFile(self) str

Returns the current .qgd auxiliary storage file or an empty string if there’s none

Return type

str

clearProjectFile(self) bool

Remove the current .qgs project file from the temporary directory.

Return type

bool

Returns

True if the file is well removed, False otherwise

projectFile(self) str

Returns the current .qgs project file or an empty string if there’s none

Return type

str

unzip(self, zipFilename: str) bool

Clear the current content of this archive and unzip. If a project file is found in the content, then this archive may be considered as a valid one. Files are unzipped in the temporary directory.

Parameters

zipFilename (str) – The zip file to unzip

Return type

bool

Returns

True if a project file has been found, False otherwise