FileUtil_impl.cpp 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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. #include "EditorDefs.h"
  9. #include "FileUtil_impl.h"
  10. bool CFileUtil_impl::ScanDirectory(const QString& path, const QString& fileSpec, FileArray& files, bool recursive, bool addDirAlso, ScanDirectoryUpdateCallBack updateCB, bool bSkipPaks)
  11. {
  12. return CFileUtil::ScanDirectory(path, fileSpec, files, recursive, addDirAlso, updateCB, bSkipPaks);
  13. }
  14. void CFileUtil_impl::ShowInExplorer(const QString& path)
  15. {
  16. CFileUtil::ShowInExplorer(path);
  17. }
  18. bool CFileUtil_impl::ExtractFile(QString& file, bool bMsgBoxAskForExtraction, const char* pDestinationFilename)
  19. {
  20. return CFileUtil::ExtractFile(file, bMsgBoxAskForExtraction, pDestinationFilename);
  21. }
  22. void CFileUtil_impl::EditTextureFile(const char* txtureFile, bool bUseGameFolder)
  23. {
  24. CFileUtil::EditTextureFile(txtureFile, bUseGameFolder);
  25. }
  26. void CFileUtil_impl::FormatFilterString(QString& filter)
  27. {
  28. CFileUtil::FormatFilterString(filter);
  29. }
  30. bool CFileUtil_impl::SelectSaveFile(const QString& fileFilter, const QString& defaulExtension, const QString& startFolder, QString& fileName)
  31. {
  32. return CFileUtil::SelectSaveFile(fileFilter, defaulExtension, startFolder, fileName);
  33. }
  34. bool CFileUtil_impl::OverwriteFile(const QString& filename)
  35. {
  36. return CFileUtil::OverwriteFile(filename);
  37. }
  38. bool CFileUtil_impl::CheckoutFile(const char* filename, QWidget* parentWindow)
  39. {
  40. return CFileUtil::CheckoutFile(filename, parentWindow);
  41. }
  42. bool CFileUtil_impl::RevertFile(const char* filename, QWidget* parentWindow)
  43. {
  44. return CFileUtil::RevertFile(filename, parentWindow);
  45. }
  46. bool CFileUtil_impl::RenameFile(const char* sourceFile, const char* targetFile, QWidget* parentWindow)
  47. {
  48. return CFileUtil::RenameFile(sourceFile, targetFile, parentWindow);
  49. }
  50. bool CFileUtil_impl::DeleteFromSourceControl(const char* filename, QWidget* parentWindow)
  51. {
  52. return CFileUtil::DeleteFromSourceControl(filename, parentWindow);
  53. }
  54. bool CFileUtil_impl::GetLatestFromSourceControl(const char* filename, QWidget* parentWindow)
  55. {
  56. return CFileUtil::GetLatestFromSourceControl(filename, parentWindow);
  57. }
  58. bool CFileUtil_impl::GetFileInfoFromSourceControl(const char* filename, AzToolsFramework::SourceControlFileInfo& fileInfo, QWidget* parentWindow)
  59. {
  60. return CFileUtil::GetFileInfoFromSourceControl(filename, fileInfo, parentWindow);
  61. }
  62. void CFileUtil_impl::CreateDirectory(const char* dir)
  63. {
  64. CFileUtil::CreateDirectory(dir);
  65. }
  66. void CFileUtil_impl::BackupFile(const char* filename)
  67. {
  68. CFileUtil::BackupFile(filename);
  69. }
  70. void CFileUtil_impl::BackupFileDated(const char* filename, bool bUseBackupSubDirectory)
  71. {
  72. CFileUtil::BackupFileDated(filename, bUseBackupSubDirectory);
  73. }
  74. bool CFileUtil_impl::Deltree(const char* szFolder, bool bRecurse)
  75. {
  76. return CFileUtil::Deltree(szFolder, bRecurse);
  77. }
  78. bool CFileUtil_impl::Exists(const QString& strPath, bool boDirectory, FileDesc* pDesc)
  79. {
  80. return CFileUtil::Exists(strPath, boDirectory, pDesc);
  81. }
  82. bool CFileUtil_impl::FileExists(const QString& strFilePath, FileDesc* pDesc)
  83. {
  84. return CFileUtil::FileExists(strFilePath, pDesc);
  85. }
  86. bool CFileUtil_impl::PathExists(const QString& strPath)
  87. {
  88. return CFileUtil::PathExists(strPath);
  89. }
  90. bool CFileUtil_impl::GetDiskFileSize(const char* pFilePath, uint64& rOutSize)
  91. {
  92. return CFileUtil::GetDiskFileSize(pFilePath, rOutSize);
  93. }
  94. bool CFileUtil_impl::IsFileExclusivelyAccessable(const QString& strFilePath)
  95. {
  96. return CFileUtil::IsFileExclusivelyAccessable(strFilePath);
  97. }
  98. bool CFileUtil_impl::CreatePath(const QString& strPath)
  99. {
  100. return CFileUtil::CreatePath(strPath);
  101. }
  102. bool CFileUtil_impl::DeleteFile(const QString& strPath)
  103. {
  104. return CFileUtil::DeleteFile(strPath);
  105. }
  106. bool CFileUtil_impl::RemoveDirectory(const QString& strPath)
  107. {
  108. return CFileUtil::RemoveDirectory(strPath);
  109. }
  110. IFileUtil::ECopyTreeResult CFileUtil_impl::CopyTree(const QString& strSourceDirectory, const QString& strTargetDirectory, bool boRecurse, bool boConfirmOverwrite)
  111. {
  112. return CFileUtil::CopyTree(strSourceDirectory, strTargetDirectory, boRecurse, boConfirmOverwrite);
  113. }
  114. IFileUtil::ECopyTreeResult CFileUtil_impl::CopyFile(const QString& strSourceFile, const QString& strTargetFile, bool boConfirmOverwrite, ProgressRoutine pfnProgress, bool* pbCancel)
  115. {
  116. return CFileUtil::CopyFile(strSourceFile, strTargetFile, boConfirmOverwrite, pfnProgress, pbCancel);
  117. }
  118. IFileUtil::ECopyTreeResult CFileUtil_impl::MoveTree(const QString& strSourceDirectory, const QString& strTargetDirectory, bool boRecurse, bool boConfirmOverwrite)
  119. {
  120. return CFileUtil::MoveTree(strSourceDirectory, strTargetDirectory, boRecurse, boConfirmOverwrite);
  121. }
  122. uint32 CFileUtil_impl::GetAttributes(const char* filename, bool bUseSourceControl)
  123. {
  124. return CFileUtil::GetAttributes(filename, bUseSourceControl);
  125. }
  126. bool CFileUtil_impl::CompareFiles(const QString& strFilePath1, const QString& strFilePath2)
  127. {
  128. return CFileUtil::CompareFiles(strFilePath1, strFilePath2);
  129. }
  130. QString CFileUtil_impl::GetPath(const QString& path)
  131. {
  132. return Path::GetPath(path);
  133. }