Misc.hpp 954 B

123456789101112131415161718192021222324252627282930313233343536
  1. #pragma once
  2. #include <stddef.h>
  3. #include <string>
  4. namespace nkg::Misc {
  5. //
  6. // Print memory data in [lpMemBegin, lpMemEnd)
  7. // If `base` is not nullptr, print address as offset. Otherwise, as absolute address.
  8. //
  9. void PrintMemory(const void* lpMemBegin, const void* lpMemEnd, const void* lpBase) noexcept;
  10. //
  11. // Print memory data in [lpMem, lpMem + cbMem)
  12. // If `base` is not nullptr, print address as offset. Otherwise, as absolute address.
  13. //
  14. void PrintMemory(const void* lpMem, size_t cbMem, const void* lpBase) noexcept;
  15. [[nodiscard]]
  16. bool FsIsExist(std::string_view szPath);
  17. [[nodiscard]]
  18. bool FsIsFile(std::string_view szPath);
  19. [[nodiscard]]
  20. bool FsIsDirectory(std::string_view szPath);
  21. void FsCopyFile(std::string_view szSourcePath, std::string_view szDestinationPath);
  22. void FsDeleteFile(std::string_view szPath);
  23. std::string FsCurrentWorkingDirectory();
  24. }