Misc.hpp 833 B

1234567891011121314151617181920212223242526272829303132
  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. [[nodiscard]]
  22. std::string FsCurrentWorkingDirectory();
  23. }