directoryutilities.h 1.2 KB

1234567891011121314151617181920212223242526272829
  1. #ifndef DIRECTORYUTILITIES_H
  2. #define DIRECTORYUTILITIES_H
  3. #include <QString>
  4. #include <QStringList>
  5. #include <QDir>
  6. #include "generatoroutputview.h"
  7. #include "generatordata.h"
  8. class DirectoryUtilities
  9. {
  10. public:
  11. DirectoryUtilities(GeneratorOutputView &outputView, GeneratorData &generatorData);
  12. void getFiles(const QString &directory, QDir::Filters &filters, const QStringList &nameFilters, int pathLengthToSubstract, const QString &filePrefixToAdd, QStringList &foundFiles);
  13. bool getFile(const QString &directory, QDir::Filters &filters, const QStringList &nameFilters, QString &foundFile);
  14. void getDirs(const QString &directory, QDir::Filters &filters, const QStringList &nameFilters, int pathLengthToSubstract, const QString &filePrefixToAdd, QStringList &foundDirs);
  15. static void cleanDirectory(const QString &directory, bool cleanSubdir, const QString &rootDirectory);
  16. bool getSubdirectory(const QString &directory, QString &subdir);
  17. bool copyDirectory(const QString &srcDirectory, const QString &destDirectory, bool deleteOriginal = false);
  18. private:
  19. GeneratorOutputView &m_outputView;
  20. GeneratorData &m_generatorData;
  21. };
  22. #endif // DIRECTORYUTILITIES_H