You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
518 B

3 years ago
  1. #pragma once
  2. #include <inotify-cpp/NotifierBuilder.h>
  3. #include <filesystem>
  4. #include <iostream>
  5. #include <thread>
  6. #include <chrono>
  7. #include <db/db.h>
  8. namespace db {
  9. class FSWatcher {
  10. public:
  11. FSWatcher(sql::Database *db, const std::string &directory);
  12. void run();
  13. void create_event(const std::string event_file);
  14. void modify_event(const std::string event_file);
  15. void delete_event(const std::string event_file);
  16. private:
  17. sql::Database* m_db;
  18. const std::string m_directory;
  19. };
  20. }