CmFileSystem.h 1.1 KB

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