1#ifndef FS_WATCHER_FALLBACK_H
2#define FS_WATCHER_FALLBACK_H
6#include <condition_variable>
47 watcher::clock_t::duration poll_interval,
49 const std::string& watcher_name) -> std::uint64_t;
58 void wait_all(watcher::clock_t::duration duration);
87 std::condition_variable
cv_;
92 std::map<std::uint64_t, std::shared_ptr<impl>>
watchers_;
A filter that combines include and exclude patterns for file/directory filtering.
watcher_fallback()=default
std::thread thread_
Thread that polls for changes.
auto watch_impl(const fs::path &path, const pattern_filter &filter, bool recursive, bool initial_list, watcher::clock_t::duration poll_interval, watcher::notify_callback callback, const std::string &watcher_name) -> std::uint64_t
std::atomic< bool > globally_paused_
std::atomic< bool > watching_
Atomic bool sync.
std::map< fs::path, std::shared_ptr< directory_listener > > directory_listeners_
void prune_stale_listeners()
std::condition_variable cv_
std::map< std::uint64_t, std::shared_ptr< impl > > watchers_
std::mutex mutex_
Mutex for the file watchers.
void unwatch_impl(std::uint64_t key)
void wait_all(watcher::clock_t::duration duration)
std::function< void(const std::vector< entry > &, bool)> notify_callback