userver: engine::io::sys_linux::Inotify Class Reference
Loading...
Searching...
No Matches
engine::io::sys_linux::Inotify Class Referencefinal

#include <userver/engine/io/sys_linux/inotify.hpp>

Detailed Description

File descriptor that allows one to monitor filesystem events, such as file creation, modification, etc.

Definition at line 62 of file inotify.hpp.

Public Member Functions

 Inotify (const Inotify &)=delete
 Inotify (Inotify &&)=delete
Inotify & operator= (Inotify &&)=delete
Inotify & operator= (const Inotify &)=delete
void AddWatch (const std::string &path, EventTypeMask flags)
void RmWatch (const std::string &path)
 Stop watching file events previously registered through AddWatch().
std::optional< EventPoll (engine::Deadline deadline)

Member Function Documentation

◆ AddWatch()

void engine::io::sys_linux::Inotify::AddWatch ( const std::string & path,
EventTypeMask flags )

Start to watch on the file path. Afterwards file events will be signaled through Poll() results.

◆ Poll()

std::optional< Event > engine::io::sys_linux::Inotify::Poll ( engine::Deadline deadline)

Read file events with event types previously registered through AddWatch(). Poll() blocks current coroutine until the event is obtained or the coroutine is cancelled.


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