CmFileSystem.h 1021 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include "CmPrerequisitesUtil.h"
  3. namespace CamelotFramework
  4. {
  5. class CM_UTILITY_EXPORT FileSystem
  6. {
  7. public:
  8. static DataStreamPtr openFile(const WString& fullPath, bool readOnly = true);
  9. static DataStreamPtr createAndOpenFile(const WString& fullPath);
  10. static UINT64 getFileSize(const WString& fullPath);
  11. static void remove(const WString& fullPath, bool recursively = true);
  12. static void move(const WString& oldPath, const WString& newPath, bool overwriteExisting = true);
  13. static void createDir(const WString& fullPath);
  14. static bool exists(const WString& fullPath);
  15. static bool isFile(const WString& fullPath);
  16. static bool isDirectory(const WString& fullPath);
  17. static void getChildren(const WString& dirPath, Vector<WString>::type& files, Vector<WString>::type& directories);
  18. static std::time_t getLastModifiedTime(const WString& fullPath);
  19. static WString getWorkingDirectoryPath();
  20. static WString getParentDirectory(const WString& path);
  21. };
  22. }