#pragma once #include #include #include "Config.h" class FileHelper { public: enum class MediaType { Unknown, Image, Gif, Video }; public: static bool GetItemFromJsonConfig(QString& addr, QMap* items); static bool GetItemFromJsonConfig(Config* config); static bool SaveItemToJsonConfig(Config* config, const QString& path); static QString GetResoucePath(const QString& name); static QStringList GetAllMediaFiles(const QString& path, bool* success); static bool GeneratJsonConfig(const QString& path); static bool GetProjectFromJsonConfig(const QString& path, QMap* items); static MediaType GetMediaType(const QString& path, const QString& name, QString& resource); };