Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
ContainedFileReader.h File Reference
#include <PhosphorFsLoader/PackPathGuard.h>
#include <PhosphorFsLoader/phosphorfsloader_export.h>
#include <QtCore/QByteArray>
#include <QtCore/QString>
#include <QtCore/QtGlobal>
#include <optional>

Go to the source code of this file.

Classes

struct  PhosphorFsLoader::ContainedFile
 What readFileWithinDirectory hands back on success. More...

Namespaces

namespace  PhosphorFsLoader

Functions

PHOSPHORFSLOADER_EXPORT std::optional< ContainedFile > PhosphorFsLoader::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 a regular file of at most maxBytes.

Variables

constexpr qsizetype PhosphorFsLoader::kMaxDeclaredPathLength = 4096
 Longest declared path readFileWithinDirectory accepts, in UTF-16 code units.