File tree 3 files changed +10
-78
lines changed
3 files changed +10
-78
lines changed Original file line number Diff line number Diff line change @@ -45,13 +45,6 @@ class QgsArchive
45
45
:rtype: bool
46
46
%End
47
47
48
- bool zip();
49
- %Docstring
50
- Zip the content of this archive. THe current filename is used.
51
- :return: false if something goes wrong, true otherwise
52
- :rtype: bool
53
- %End
54
-
55
48
virtual bool unzip( const QString &zipFilename );
56
49
%Docstring
57
50
Clear the current content of this archive and unzip. Files are unzipped
@@ -61,16 +54,6 @@ class QgsArchive
61
54
:rtype: bool
62
55
%End
63
56
64
- bool unzip();
65
- %Docstring
66
- Clear the current content of this archive and unzip. If a project file
67
- is found in the content, then this archive may be considered as a valid
68
- one. Files are unzipped in the temporary directory. The current filename
69
- is used.
70
- :return: true if a project file has been found, false otherwise
71
- :rtype: bool
72
- %End
73
-
74
57
void clear();
75
58
%Docstring
76
59
Clear the current content of this archive and create a new temporary
@@ -84,18 +67,6 @@ class QgsArchive
84
67
\param filename A file to add when zipping this archive
85
68
%End
86
69
87
- void setFileName( const QString &filename );
88
- %Docstring
89
- Set the filename to use when zipping/unzipping this archive.
90
- \param filename The zip filename
91
- %End
92
-
93
- QString filename() const;
94
- %Docstring
95
- Returns the current zip filename.
96
- :rtype: str
97
- %End
98
-
99
70
QStringList files() const;
100
71
%Docstring
101
72
Returns the list of files within this archive
Original file line number Diff line number Diff line change @@ -612,55 +612,7 @@ Returns the number of registered layers.
612
612
:rtype: QMap<str, QgsMapLayer *>
613
613
%End
614
614
615
- bool unzip( const QString &filename );
616
- %Docstring
617
- Unzip a project
618
- \param filename The zip file to unzip
619
- :return: true if unzip is well performed, false otherwise
620
- .. versionadded:: 3.0
621
- :rtype: bool
622
- %End
623
-
624
- bool unzip();
625
- %Docstring
626
- Unzip a project with the current zip filename
627
- :return: true if unzip is well performed, false otherwise
628
- .. versionadded:: 3.0
629
- :rtype: bool
630
- %End
631
-
632
- bool zip( const QString &filename );
633
- %Docstring
634
- Zip the project
635
- \param filename The zip filename
636
- :return: true if zip is well performed, false otherwise
637
- .. versionadded:: 3.0
638
- :rtype: bool
639
- %End
640
-
641
- bool zip();
642
- %Docstring
643
- Zip the project with the current zip filename
644
- :return: true if zip is well performed, false otherwise
645
- .. versionadded:: 3.0
646
- :rtype: bool
647
- %End
648
-
649
- QString zipFileName() const;
650
- %Docstring
651
- Returns the current zip filename or an empty string if none.
652
- .. versionadded:: 3.0
653
- :rtype: str
654
- %End
655
-
656
- void setZipFileName( const QString &filename );
657
- %Docstring
658
- Sets the current zip filename.
659
- \param filename The zip filename
660
- .. versionadded:: 3.0
661
- %End
662
-
663
- bool unzipped() const;
615
+ bool isZipped() const;
664
616
%Docstring
665
617
Returns true if the project comes from a zip archive, false otherwise.
666
618
:rtype: bool
Original file line number Diff line number Diff line change 15
15
namespace QgsZipUtils
16
16
{
17
17
18
+ bool isZipFile( const QString &filename );
19
+ %Docstring
20
+ Returns true if the file name is a zipped file ( i.e with a '.qgz'
21
+ extension, false otherwise.
22
+ \param filename The name of the file
23
+ :return: true if the file is zipped, false otherwise
24
+ :rtype: bool
25
+ %End
26
+
18
27
bool unzip( const QString &zip, const QString &dir, QStringList &files /Out/ );
19
28
%Docstring
20
29
Unzip a zip file in an output directory. An error is returned if the zip
You can’t perform that action at this time.
0 commit comments