FileEnum.h 963 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #ifndef CRYINCLUDE_EDITOR_UTIL_FILEENUM_H
  9. #define CRYINCLUDE_EDITOR_UTIL_FILEENUM_H
  10. #pragma once
  11. #include <QDirIterator>
  12. class QFileInfo;
  13. class QString;
  14. class QStringList;
  15. class CFileEnum
  16. {
  17. public:
  18. CFileEnum();
  19. virtual ~CFileEnum();
  20. bool GetNextFile(QFileInfo* pFile);
  21. bool StartEnumeration(const QString& szEnumPathAndPattern, QFileInfo* pFile);
  22. bool StartEnumeration(const QString& szEnumPath, const QString& szEnumPattern, QFileInfo* pFile);
  23. static bool ScanDirectory(
  24. const QString& path,
  25. const QString& file,
  26. QStringList& files,
  27. bool bRecursive = true,
  28. bool bSkipPaks = false);
  29. protected:
  30. QDirIterator* m_hEnumFile;
  31. };
  32. #endif // CRYINCLUDE_EDITOR_UTIL_FILEENUM_H