ckb-next  v0.2.8 at branch master
ckb-next driver for corsair devices
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 "quazip.h"
31 #include "quazipfileinfo.h"
32 #include <QDir>
33 #include <QList>
34 #include <QSharedDataPointer>
35 
37 
55 private:
56  QSharedDataPointer<QuaZipDirPrivate> d;
57 public:
59  QuaZipDir(const QuaZipDir &that);
61 
65  QuaZipDir(QuaZip *zip, const QString &dir = QString());
67  ~QuaZipDir();
69  bool operator==(const QuaZipDir &that);
71 
75  inline bool operator!=(const QuaZipDir &that) {return !operator==(that);}
77 
81  QuaZipDir& operator=(const QuaZipDir &that);
83  QString operator[](int pos) const;
85  QuaZip::CaseSensitivity caseSensitivity() const;
87 
96  bool cd(const QString &dirName);
98  bool cdUp();
100  uint count() const;
102 
105  QString dirName() const;
107 
114  QList<QuaZipFileInfo> entryInfoList(const QStringList &nameFilters,
115  QDir::Filters filters = QDir::NoFilter,
116  QDir::SortFlags sort = QDir::NoSort) const;
118 
123  QList<QuaZipFileInfo> entryInfoList(QDir::Filters filters = QDir::NoFilter,
124  QDir::SortFlags sort = QDir::NoSort) const;
126 
133  QList<QuaZipFileInfo64> entryInfoList64(const QStringList &nameFilters,
134  QDir::Filters filters = QDir::NoFilter,
135  QDir::SortFlags sort = QDir::NoSort) const;
137 
142  QList<QuaZipFileInfo64> entryInfoList64(QDir::Filters filters = QDir::NoFilter,
143  QDir::SortFlags sort = QDir::NoSort) const;
145 
149  QStringList entryList(const QStringList &nameFilters,
150  QDir::Filters filters = QDir::NoFilter,
151  QDir::SortFlags sort = QDir::NoSort) const;
153 
158  QStringList entryList(QDir::Filters filters = QDir::NoFilter,
159  QDir::SortFlags sort = QDir::NoSort) const;
161 
167  bool exists(const QString &fileName) const;
169  bool exists() const;
171 
174  QString filePath(const QString &fileName) const;
176  QDir::Filters filter();
178 
181  bool isRoot() const;
183  QStringList nameFilters() const;
185 
189  QString path() const;
191 
199  QString relativeFilePath(const QString &fileName) const;
201  void setCaseSensitivity(QuaZip::CaseSensitivity caseSensitivity);
203  void setFilter(QDir::Filters filters);
205  void setNameFilters(const QStringList &nameFilters);
207 
216  void setPath(const QString &path);
218  void setSorting(QDir::SortFlags sort);
220  QDir::SortFlags sorting() const;
221 };
222 
223 #endif // QUAZIP_QUAZIPDIR_H
bool operator!=(const QuaZipDir &that)
operator!=
Definition: quazipdir.h:75
ZIP archive.
Definition: quazip.h:84
QSharedDataPointer< QuaZipDirPrivate > d
Definition: quazipdir.h:56
CaseSensitivity
Case sensitivity for the file names.
Definition: quazip.h:114
Provides ZIP archive navigation.
Definition: quazipdir.h:54
#define QUAZIP_EXPORT
This is automatically defined when building a static library, but when including QuaZip sources direc...
Definition: quazip_global.h:46