QuaZIP: quazip/quazipfileinfo.h Source File

QuaZIP quazip-0-7-1

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

- File List

quazipfileinfo.h

    00001 #ifndef QUA_ZIPFILEINFO_H
    00002 #define QUA_ZIPFILEINFO_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 #include <QByteArray>
    00029 #include <QDateTime>
    00030 #include <QFile>
    00031
    00032 #include "quazip_global.h"
    00033
    00035
    00041 struct QUAZIP_EXPORT QuaZipFileInfo {
    00043   QString name;
    00045   quint16 versionCreated;
    00047   quint16 versionNeeded;
    00049   quint16 flags;
    00051   quint16 method;
    00053   QDateTime dateTime;
    00055   quint32 crc;
    00057   quint32 compressedSize;
    00059   quint32 uncompressedSize;
    00061   quint16 diskNumberStart;
    00063   quint16 internalAttr;
    00065   quint32 externalAttr;
    00067   QString comment;
    00069   QByteArray extra;
    00071
    00075   QFile::Permissions getPermissions() const;
    00076 };
    00077
    00079
    00081 struct QUAZIP_EXPORT QuaZipFileInfo64 {
    00083   QString name;
    00085   quint16 versionCreated;
    00087   quint16 versionNeeded;
    00089   quint16 flags;
    00091   quint16 method;
    00093
    00100   QDateTime dateTime;
    00102   quint32 crc;
    00104   quint64 compressedSize;
    00106   quint64 uncompressedSize;
    00108   quint16 diskNumberStart;
    00110   quint16 internalAttr;
    00112   quint32 externalAttr;
    00114   QString comment;
    00116   QByteArray extra;
    00118
    00122   QFile::Permissions getPermissions() const;
    00124
    00134   bool toQuaZipFileInfo(QuaZipFileInfo &info) const;
    00136
    00147   QDateTime getNTFSmTime(int *fineTicks = NULL) const;
    00149
    00160   QDateTime getNTFSaTime(int *fineTicks = NULL) const;
    00162
    00173   QDateTime getNTFScTime(int *fineTicks = NULL) const;
    00175   bool isEncrypted() const {return (flags & 1) != 0;}
    00176 };
    00177
    00178 #endif