Index: sources/storage/filehandler.h =================================================================== diff -u -r781e62c996e81897517fbdb1bc79fe3bbcf165c1 -r415f3e16ff6e572c8ce7e7b3576e82ce8b44c6ce --- sources/storage/filehandler.h (.../filehandler.h) (revision 781e62c996e81897517fbdb1bc79fe3bbcf165c1) +++ sources/storage/filehandler.h (.../filehandler.h) (revision 415f3e16ff6e572c8ce7e7b3576e82ce8b44c6ce) @@ -14,33 +14,24 @@ #pragma once // Qt -#include -#include -// Project +#include namespace Storage { -class FileHandler : public QObject +/*! + * \brief The FileHandler class + * This class is suppose to be the static class + * which contains methods to manipulate files and folders + * Since it is static it doesn't have thread so needs to be used with care + * and the class(es) which is using it needs to be taking care of the threading + */ +class FileHandler { - Q_OBJECT - - const char *_usbMount = "/media"; - - QFileSystemWatcher fsWatcher; - public: - explicit FileHandler(QObject *parent = nullptr); + static bool write(const QString &vFileName, const QString &vContent, bool vAppend = true); + static bool read (const QString &vFileName, QString &vContent); - bool init(); - bool doExport(); - bool doImport(); - -signals: - void usbStatusChanged(bool available); - -private slots: - void directoryChanged(const QString &vPath); - bool mountUsb(); + static int copyFolder(const QString &vSource, const QString &vDestination); }; }