Unravel Engine C++ Reference
Loading...
Searching...
No Matches
fs::watcher_fallback Class Reference

#include <watcher_fallback.h>

Classes

class  directory_listener
 
class  impl
 

Public Member Functions

 ~watcher_fallback ()
 
 watcher_fallback ()=default
 
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
 
void unwatch_impl (std::uint64_t key)
 
void unwatch_all_impl ()
 
void pause ()
 
void resume ()
 
void wait_all (watcher::clock_t::duration duration)
 
void close ()
 
void start ()
 
void prune_stale_listeners ()
 

Public Attributes

std::mutex mutex_
 Mutex for the file watchers.
 
std::atomic< bool > watching_ = {false}
 Atomic bool sync.
 
std::atomic< bool > globally_paused_ = {false}
 
std::condition_variable cv_
 
std::thread thread_
 Thread that polls for changes.
 
std::map< std::uint64_t, std::shared_ptr< impl > > watchers_
 
std::map< fs::path, std::shared_ptr< directory_listener > > directory_listeners_
 

Detailed Description

Definition at line 21 of file watcher_fallback.h.

Constructor & Destructor Documentation

◆ ~watcher_fallback()

fs::watcher_fallback::~watcher_fallback ( )

Definition at line 715 of file watcher_fallback.cpp.

◆ watcher_fallback()

fs::watcher_fallback::watcher_fallback ( )
default

Member Function Documentation

◆ close()

void fs::watcher_fallback::close ( )

Definition at line 757 of file watcher_fallback.cpp.

◆ pause()

void fs::watcher_fallback::pause ( )

Definition at line 720 of file watcher_fallback.cpp.

◆ prune_stale_listeners()

void fs::watcher_fallback::prune_stale_listeners ( )

Definition at line 894 of file watcher_fallback.cpp.

◆ resume()

void fs::watcher_fallback::resume ( )

Definition at line 734 of file watcher_fallback.cpp.

◆ start()

void fs::watcher_fallback::start ( )

Definition at line 770 of file watcher_fallback.cpp.

◆ unwatch_all_impl()

void fs::watcher_fallback::unwatch_all_impl ( )

Definition at line 926 of file watcher_fallback.cpp.

◆ unwatch_impl()

void fs::watcher_fallback::unwatch_impl ( std::uint64_t key)

Definition at line 916 of file watcher_fallback.cpp.

◆ wait_all()

void fs::watcher_fallback::wait_all ( watcher::clock_t::duration duration)

Definition at line 752 of file watcher_fallback.cpp.

◆ watch_impl()

auto fs::watcher_fallback::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

Definition at line 824 of file watcher_fallback.cpp.

Member Data Documentation

◆ cv_

std::condition_variable fs::watcher_fallback::cv_

Definition at line 87 of file watcher_fallback.h.

◆ directory_listeners_

std::map<fs::path, std::shared_ptr<directory_listener> > fs::watcher_fallback::directory_listeners_

Definition at line 96 of file watcher_fallback.h.

◆ globally_paused_

std::atomic<bool> fs::watcher_fallback::globally_paused_ = {false}

Definition at line 85 of file watcher_fallback.h.

◆ mutex_

std::mutex fs::watcher_fallback::mutex_

Mutex for the file watchers.

Definition at line 81 of file watcher_fallback.h.

◆ thread_

std::thread fs::watcher_fallback::thread_

Thread that polls for changes.

Definition at line 89 of file watcher_fallback.h.

◆ watchers_

std::map<std::uint64_t, std::shared_ptr<impl> > fs::watcher_fallback::watchers_

Definition at line 92 of file watcher_fallback.h.

◆ watching_

std::atomic<bool> fs::watcher_fallback::watching_ = {false}

Atomic bool sync.

Definition at line 83 of file watcher_fallback.h.


The documentation for this class was generated from the following files: