1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QRESOURCE_P_H
6#define QRESOURCE_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include "qabstractfileengine_p.h"
20
21QT_BEGIN_NAMESPACE
22
23class QResourceFileEnginePrivate;
24class QResourceFileEngine : public QAbstractFileEngine
25{
26private:
27 Q_DECLARE_PRIVATE(QResourceFileEngine)
28public:
29 explicit QResourceFileEngine(const QString &path);
30 ~QResourceFileEngine();
31
32 void setFileName(const QString &file) override;
33
34 bool open(QIODevice::OpenMode flags, std::optional<QFile::Permissions> permissions) override;
35 bool close() override;
36 bool flush() override;
37 qint64 size() const override;
38 qint64 pos() const override;
39 virtual bool atEnd() const;
40 bool seek(qint64) override;
41 qint64 read(char *data, qint64 maxlen) override;
42
43 bool caseSensitive() const override;
44
45 FileFlags fileFlags(FileFlags type) const override;
46
47 QString fileName(QAbstractFileEngine::FileName file) const override;
48
49 uint ownerId(FileOwner) const override;
50
51 QDateTime fileTime(QFile::FileTime time) const override;
52
53 IteratorUniquePtr beginEntryList(const QString &path, QDirListing::IteratorFlags filters,
54 const QStringList &filterNames) override;
55
56 bool extension(Extension extension, const ExtensionOption *option = nullptr, ExtensionReturn *output = nullptr) override;
57 bool supportsExtension(Extension extension) const override;
58};
59
60QT_END_NAMESPACE
61
62#endif // QRESOURCE_P_H
63

source code of qtbase/src/corelib/io/qresource_p.h