24 :
prev{std::move(previous)},
curr{std::move(current)}
42 static void startCallback(uv_fs_poll_t *handle,
int status,
const uv_stat_t *
prev,
const uv_stat_t *
curr) {
44 if(status) { fsPoll.publish(
ErrorEvent{status}); }
49 using Time = std::chrono::duration<unsigned int, std::milli>;
58 return initialize(&uv_fs_poll_init);
69 void start(std::string file, Time interval) {
70 invoke(&uv_fs_poll_start,
get(), &startCallback, file.data(), interval.count());
77 invoke(&uv_fs_poll_stop,
get());
85 std::string
path() noexcept {
86 return details::tryRead(&uv_fs_poll_getpath,
get());
void start(std::string file, Time interval)
Starts the handle.
bool init()
Initializes the handle.
void stop()
Stops the handle.
std::string path() noexcept
Gets the path being monitored by the handle.