QuaZIP quazip-0-7-2

- Main Page
- Related Pages
- Classes
- Files
- Directories

- File List

quazipdir.h

    00001 #ifndef QUAZIP_QUAZIPDIR_H
    00002 #define QUAZIP_QUAZIPDIR_H
    00003
    00004 /*
    00005 Copyright (C) 2005-2014 Sergey A. Tachenov
    00006
    00007 This file is part of QuaZIP.
    00008
    00009 QuaZIP is free software: you can redistribute it and/or modify
    00010 it under the terms of the GNU Lesser General Public License as published by
    00011 the Free Software Foundation, either version 2.1 of the License, or
    00012 (at your option) any later version.
    00013
    00014 QuaZIP is distributed in the hope that it will be useful,
    00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
    00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00017 GNU Lesser General Public License for more details.
    00018
    00019 You should have received a copy of the GNU Lesser General Public License
    00020 along with QuaZIP.  If not, see <http://www.gnu.org/licenses/>.
    00021
    00022 See COPYING file for the full LGPL text.
    00023
    00024 Original ZIP package is copyrighted by Gilles Vollant and contributors,
    00025 see quazip/(un)zip.h files for details. Basically it's the zlib license.
    00026 */
    00027
    00028 class QuaZipDirPrivate;
    00029
    00030 #include "quazip.h"
    00031 #include "quazipfileinfo.h"
    00032 #include <QDir>
    00033 #include <QList>
    00034 #include <QSharedDataPointer>
    00035
    00037
    00054 class QUAZIP_EXPORT QuaZipDir {
    00055 private:
    00056     QSharedDataPointer<QuaZipDirPrivate> d;
    00057 public:
    00059     QuaZipDir(const QuaZipDir &that);
    00061
    00065     QuaZipDir(QuaZip *zip, const QString &dir = QString());
    00067     ~QuaZipDir();
    00069     bool operator==(const QuaZipDir &that);
    00071
    00075     inline bool operator!=(const QuaZipDir &that) {return !operator==(that);}
    00077
    00081     QuaZipDir& operator=(const QuaZipDir &that);
    00083     QString operator[](int pos) const;
    00085     QuaZip::CaseSensitivity caseSensitivity() const;
    00087
    00096     bool cd(const QString &dirName);
    00098     bool cdUp();
    00100     uint count() const;
    00102
    00105     QString dirName() const;
    00107
    00114     QList<QuaZipFileInfo> entryInfoList(const QStringList &nameFilters,
    00115         QDir::Filters filters = QDir::NoFilter,
    00116         QDir::SortFlags sort = QDir::NoSort) const;
    00118
    00123     QList<QuaZipFileInfo> entryInfoList(QDir::Filters filters = QDir::NoFilter,
    00124         QDir::SortFlags sort = QDir::NoSort) const;
    00126
    00133     QList<QuaZipFileInfo64> entryInfoList64(const QStringList &nameFilters,
    00134         QDir::Filters filters = QDir::NoFilter,
    00135         QDir::SortFlags sort = QDir::NoSort) const;
    00137
    00142     QList<QuaZipFileInfo64> entryInfoList64(QDir::Filters filters = QDir::NoFilter,
    00143         QDir::SortFlags sort = QDir::NoSort) const;
    00145
    00149     QStringList entryList(const QStringList &nameFilters,
    00150         QDir::Filters filters = QDir::NoFilter,
    00151         QDir::SortFlags sort = QDir::NoSort) const;
    00153
    00158     QStringList entryList(QDir::Filters filters = QDir::NoFilter,
    00159         QDir::SortFlags sort = QDir::NoSort) const;
    00161
    00167     bool exists(const QString &fileName) const;
    00169     bool exists() const;
    00171
    00174     QString filePath(const QString &fileName) const;
    00176     QDir::Filters filter();
    00178
    00181     bool isRoot() const;
    00183     QStringList nameFilters() const;
    00185
    00189     QString path() const;
    00191
    00199     QString relativeFilePath(const QString &fileName) const;
    00201     void setCaseSensitivity(QuaZip::CaseSensitivity caseSensitivity);
    00203     void setFilter(QDir::Filters filters);
    00205     void setNameFilters(const QStringList &nameFilters);
    00207
    00216     void setPath(const QString &path);
    00218     void setSorting(QDir::SortFlags sort);
    00220     QDir::SortFlags sorting() const;
    00221 };
    00222
    00223 #endif // QUAZIP_QUAZIPDIR_H