Class: QgsArchive¶
Class allowing to manage the zip/unzip actions
Class Hierarchy¶
Subclasses¶
Class allowing to manage the zip/unzip actions on project file  | 
Methods
Add a new file to this archive.  | 
|
Clear the current content of this archive and create a new temporary directory.  | 
|
Returns the current temporary directory.  | 
|
Returns   | 
|
Returns the list of files within this archive  | 
|
Remove a file from this archive and from the filesystem.  | 
|
Clear the current content of this archive and unzip.  | 
|
Zip the content of this archive  | 
- class qgis.core.QgsArchive[source]¶
 Bases:
object- addFile(self, filename: str | None)[source]¶
 Add a new file to this archive. During a zip action, this file will be part of the resulting zipped file.
- Parameters:
 filename (Optional[str]) – A file to add when zipping this archive
- clear(self)[source]¶
 Clear the current content of this archive and create a new temporary directory.
- exists(self) bool[source]¶
 Returns
Trueif the archive exists on the filesystem,Falseotherwise.Added in version 3.20.
- Return type:
 bool
- removeFile(self, filename: str | None) bool[source]¶
 Remove a file from this archive and from the filesystem.
- Parameters:
 filename (Optional[str]) – The path of the file to remove
- Return type:
 bool
- Returns:
 Trueif the file has been removed from the filesystem,Falseotherwise