#include <watcher.h>
|
| static auto | watch (const fs::path &path, const pattern_filter &filter, bool recursive, bool initial_list, clock_t::duration poll_interval, notify_callback callback, const std::string &watcher_name="") -> std::uint64_t |
| | Watches a file or directory for modification and call back the specified std::function. A list of modified files or directory is passed as argument of the callback. Use this version only if you are watching multiple files or a directory.
|
| |
| static void | unwatch (std::uint64_t key) |
| | Un-watches a previously registered file or directory.
|
| |
| static void | unwatch_all () |
| | Un-watches all previously registered file or directory.
|
| |
| static void | touch (const fs::path &path, bool recursive, fs::file_time_type time=fs::now()) |
| | Sets the last modification time of a file or directory. by default sets the time to the current time.
|
| |
| static void | pause () |
| | Pauses all watchers.
|
| |
| static void | resume () |
| | Resumes all watchers.
|
| |
Definition at line 18 of file watcher.h.
◆ clock_t
◆ notify_callback
◆ entry_status
| Enumerator |
|---|
| created | |
| modified | |
| removed | |
| renamed | |
| unmodified | |
Definition at line 21 of file watcher.h.
◆ pause()
| void fs::watcher::pause |
( |
| ) |
|
|
static |
◆ resume()
| void fs::watcher::resume |
( |
| ) |
|
|
static |
◆ touch()
| void fs::watcher::touch |
( |
const fs::path & | path, |
|
|
bool | recursive, |
|
|
fs::file_time_type | time = fs::now() ) |
|
static |
Sets the last modification time of a file or directory. by default sets the time to the current time.
Definition at line 57 of file watcher.cpp.
◆ unwatch()
| void fs::watcher::unwatch |
( |
std::uint64_t | key | ) |
|
|
static |
Un-watches a previously registered file or directory.
Definition at line 45 of file watcher.cpp.
◆ unwatch_all()
| void fs::watcher::unwatch_all |
( |
| ) |
|
|
static |
Un-watches all previously registered file or directory.
Definition at line 51 of file watcher.cpp.
◆ watch()
| auto fs::watcher::watch |
( |
const fs::path & | path, |
|
|
const pattern_filter & | filter, |
|
|
bool | recursive, |
|
|
bool | initial_list, |
|
|
clock_t::duration | poll_interval, |
|
|
notify_callback | callback, |
|
|
const std::string & | watcher_name = "" ) -> std::uint64_t |
|
static |
Watches a file or directory for modification and call back the specified std::function. A list of modified files or directory is passed as argument of the callback. Use this version only if you are watching multiple files or a directory.
Definition at line 27 of file watcher.cpp.
The documentation for this class was generated from the following files: