7#include <PhosphorFsLoader/phosphorfsloader_export.h>
9#include <QtCore/QByteArray>
10#include <QtCore/QString>
11#include <QtCore/QtGlobal>
65[[nodiscard]] PHOSPHORFSLOADER_EXPORT std::optional<ContainedFile>
67 qint64 maxBytes, QString* error =
nullptr);
Definition ContainedFileReader.h:15
AbsolutePathPolicy
What to do with a declared path that is already absolute.
Definition PackPathGuard.h:16
PHOSPHORFSLOADER_EXPORT std::optional< ContainedFile > readFileWithinDirectory(const QString &declaredPath, const QString &directory, AbsolutePathPolicy policy, qint64 maxBytes, QString *error=nullptr)
Read declaredPath, resolved against directory, refusing anything that escapes the directory or is not...
constexpr qsizetype kMaxDeclaredPathLength
Longest declared path readFileWithinDirectory accepts, in UTF-16 code units.
Definition ContainedFileReader.h:20
What readFileWithinDirectory hands back on success.
Definition ContainedFileReader.h:24
QString path
The cleaned absolute path that was opened, in the same lexical form resolveWithinDirectory returns,...
Definition ContainedFileReader.h:29
QByteArray bytes
The whole file, never more than the caller's limit.
Definition ContainedFileReader.h:26