FileHelpers.h 1011 B

12345678910111213141516171819202122232425262728293031323334353637
  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. #pragma once
  9. class QWidget;
  10. namespace FileHelpers
  11. {
  12. QString GetAbsoluteDir(const char* subDir);
  13. QString GetAbsoluteGameDir();
  14. QString GetRelativePathFromEngineRoot(const QString& fullpath);
  15. void AppendExtensionIfNotPresent(QString& filename,
  16. const char* extension);
  17. bool FilenameHasExtension(QString& filename,
  18. const char* extension);
  19. QString GetAppDataPath();
  20. enum class SourceControlResult
  21. {
  22. kSourceControlResult_Ok,
  23. kSourceControlResult_NoSourceControl,
  24. kSourceControlResult_NotConnected,
  25. kSourceControlResult_SourceControlDown,
  26. kSourceControlResult_SourceControlError
  27. };
  28. SourceControlResult SourceControlAddOrEdit(const char* fullPath, QWidget* parent);
  29. } // namespace FileHelpers