|
qb
2.0.0.0
C++17 Actor Framework
|
Event for file and directory attribute change monitoring. More...
#include <file.h>


Public Types | |
| using | base_t = base<ev::stat> |
| Base type alias for base<ev::stat>. | |
| Public Types inherited from qb::io::async::event::base< ev::stat > | |
| using | ev_t |
| Alias for the underlying libev event watcher type. | |
Public Member Functions | |
| file (ev::loop_ref loop) | |
| Constructor. | |
| Public Member Functions inherited from qb::io::async::event::base< ev::stat > | |
| base (ev::loop_ref loop) | |
| Constructor. | |
Additional Inherited Members | |
| Public Attributes inherited from qb::io::async::event::base< ev::stat > | |
| IRegisteredKernelEvent * | _interface |
| Pointer to the kernel event interface responsible for handling this event. | |
| int | _revents |
| Stores the event flags (e.g., EV_READ, EV_WRITE) received from libev when the event triggers. | |
Event for file and directory attribute change monitoring.
This event extends qb::io::async::event::base<ev::stat> and thus wraps an ev::stat watcher from libev. It is used by components like qb::io::async::file_watcher and qb::io::async::directory_watcher to notify when attributes of a monitored file or directory (e.g., size, modification time) have changed.
The ev::stat member (accessible as this->attr or event.attr in the handler) contains the current stat attributes, and event.prev contains the attributes from the previous check.
Usage Example:
|
inlineexplicit |
Constructor.
| loop | Reference to the libev event loop (ev::loop_ref) this event watcher will be associated with. |