Index: sources/storage/FileHandler.h =================================================================== diff -u -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b -ra3030123e885fb9f22dea5839c4e988896a257e4 --- sources/storage/FileHandler.h (.../FileHandler.h) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) +++ sources/storage/FileHandler.h (.../FileHandler.h) (revision a3030123e885fb9f22dea5839c4e988896a257e4) @@ -16,8 +16,11 @@ // Qt #include +#include #include #include +#include + class QDate; namespace Storage { @@ -36,11 +39,15 @@ public: static bool write (const QString &vFileName, const QString &vContent, bool vAppend = true); static bool read (const QString &vFileName, QString &vContent); - static bool readJSON (const QString &vFileName, QJsonObject &vContent); + static bool read (const QString &vFileName, QJsonObject &vContent, QJsonParseError *error = nullptr); static int copyFolder (const QString &vSource , const QString &vDestination); static int removeFiles(const QStringList &vFolders, const QStringList &vNameFilter, const QDate &vDateOlderThan); static bool makeFolder (const QString &vFolder); static bool isMounted (const QString &vPath, bool *vIsReadOnly = nullptr); + + static QFileInfoList find(const QString &vPath, QStringList vNameFilter, quint8 vRetainPercent); + static QFileInfoList find(const QString &vPath, QStringList vNameFilter); + static quint64 totalSize(const QFileInfoList &vFileInfoList); }; }