fileChanged.h 549 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #pragma once
  2. #include "pikaConfig.h"
  3. #include <filesystem>
  4. #include <logs/assert.h>
  5. #ifdef PIKA_WINDOWS
  6. #define NOMINMAX
  7. #include <Windows.h>
  8. namespace pika
  9. {
  10. struct FileChanged
  11. {
  12. std::filesystem::path path;
  13. FILETIME time = {};
  14. void setFile(const char *path);
  15. bool changed();
  16. private:
  17. };
  18. #else
  19. struct FileChanged
  20. {
  21. std::filesystem::path path;
  22. void setFile(const char *path) {}
  23. bool changed()
  24. {
  25. PIKA_PERMA_ASSERT(0, "file changed only supported on windows");
  26. return 0;
  27. }
  28. };
  29. #endif
  30. };