ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
quazipdir.h
Go to the documentation of this file.
1 #ifndef QUAZIP_QUAZIPDIR_H
2 #define QUAZIP_QUAZIPDIR_H
3 
4 /*
5 Copyright (C) 2005-2014 Sergey A. Tachenov
6 
7 This file is part of QuaZIP.
8 
9 QuaZIP is free software: you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation, either version 2.1 of the License, or
12 (at your option) any later version.
13 
14 QuaZIP is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU Lesser General Public License for more details.
18 
19 You should have received a copy of the GNU Lesser General Public License
20 along with QuaZIP. If not, see <http://www.gnu.org/licenses/>.
21 
22 See COPYING file for the full LGPL text.
23 
24 Original ZIP package is copyrighted by Gilles Vollant and contributors,
25 see quazip/(un)zip.h files for details. Basically it's the zlib license.
26 */
27 
28 class QuaZipDirPrivate;
29 
30 #include <QDir>
31 #include <QList>
32 #include <QSharedDataPointer>
33 
34 #include "quazip.h"
35 #include "quazipfileinfo.h"
36 
38 
56 private:
57  QSharedDataPointer<QuaZipDirPrivate> d;
58 
59 public:
61  QuaZipDir(const QuaZipDir &that);
63 
67  QuaZipDir(QuaZip *zip, const QString &dir = QString());
69  ~QuaZipDir();
71  bool operator==(const QuaZipDir &that);
73 
77  inline bool operator!=(const QuaZipDir &that) { return !operator==(that); }
79 
83  QuaZipDir &operator=(const QuaZipDir &that);
85  QString operator[](int pos) const;
87  QuaZip::CaseSensitivity caseSensitivity() const;
89 
98  bool cd(const QString &dirName);
100  bool cdUp();
102  uint count() const;
104 
107  QString dirName() const;
109 
116  QList<QuaZipFileInfo> entryInfoList(
117  const QStringList &nameFilters,
118  QDir::Filters filters = QDir::NoFilter,
119  QDir::SortFlags sort = QDir::NoSort) const;
121 
126  QList<QuaZipFileInfo> entryInfoList(
127  QDir::Filters filters = QDir::NoFilter,
128  QDir::SortFlags sort = QDir::NoSort) const;
130 
137  QList<QuaZipFileInfo64> entryInfoList64(
138  const QStringList &nameFilters,
139  QDir::Filters filters = QDir::NoFilter,
140  QDir::SortFlags sort = QDir::NoSort) const;
142 
147  QList<QuaZipFileInfo64> entryInfoList64(
148  QDir::Filters filters = QDir::NoFilter,
149  QDir::SortFlags sort = QDir::NoSort) const;
151 
155  QStringList entryList(const QStringList &nameFilters,
156  QDir::Filters filters = QDir::NoFilter,
157  QDir::SortFlags sort = QDir::NoSort) const;
159 
164  QStringList entryList(QDir::Filters filters = QDir::NoFilter,
165  QDir::SortFlags sort = QDir::NoSort) const;
167 
173  bool exists(const QString &fileName) const;
175  bool exists() const;
177 
180  QString filePath(const QString &fileName) const;
182  QDir::Filters filter();
184 
187  bool isRoot() const;
189  QStringList nameFilters() const;
191 
195  QString path() const;
197 
205  QString relativeFilePath(const QString &fileName) const;
207  void setCaseSensitivity(QuaZip::CaseSensitivity caseSensitivity);
209  void setFilter(QDir::Filters filters);
211  void setNameFilters(const QStringList &nameFilters);
213 
222  void setPath(const QString &path);
224  void setSorting(QDir::SortFlags sort);
226  QDir::SortFlags sorting() const;
227 };
228 
229 #endif // QUAZIP_QUAZIPDIR_H
int count
Provides ZIP archive navigation.
Definition: quazipdir.h:55
bool operator!=(const QuaZipDir &that)
operator!=
Definition: quazipdir.h:77
ZIP archive.
Definition: quazip.h:128
CaseSensitivity
Case sensitivity for the file names.
Definition: quazip.h:159
unsigned int uint
Definition: cutil_math.h:28
static const std::string path
Definition: PointCloud.cpp:59
constexpr bool operator==(const optional< T > &x, const optional< T > &y)
Definition: Optional.h:615
#define QUAZIP_EXPORT
Definition: quazip_global.h:46