libfswatch
1.9.3
|
Type representing a file change event. More...
#include <event.hpp>
Public Member Functions | |
event (std::string path, time_t evt_time, std::vector< fsw_event_flag > flags) | |
Constructs an event. More... | |
virtual | ~event () |
Destructs an event. More... | |
std::string | get_path () const |
Returns the path of the event. More... | |
time_t | get_time () const |
Returns the time of the event. More... | |
std::vector< fsw_event_flag > | get_flags () const |
Returns the flags of the event. More... | |
Static Public Member Functions | |
static fsw_event_flag | get_event_flag_by_name (const std::string &name) |
Get event flag by name. More... | |
static std::string | get_event_flag_name (const fsw_event_flag &flag) |
Get the name of an event flag. More... | |
Type representing a file change event.
This class represents a file change event in the libfswatch
API. An event contains:
fsw::event::event | ( | std::string | path, |
time_t | evt_time, | ||
std::vector< fsw_event_flag > | flags | ||
) |
Constructs an event.
path | The path the event refers to. |
evt_time | The time the event was raised. |
flags | The vector of flags specifying the type of the event. |
|
virtual |
Destructs an event.
This is a virtual destructor that performs no operations.
|
static |
Get event flag by name.
name | The name of the event flag to look for. |
name
, otherwise libfsw_exception | if no event flag is found. |
|
static |
Get the name of an event flag.
flag | The event flag. |
flag
. libfsw_exception | if no event flag is found. |
vector< fsw_event_flag > fsw::event::get_flags | ( | ) | const |
Returns the flags of the event.
string fsw::event::get_path | ( | ) | const |
Returns the path of the event.
time_t fsw::event::get_time | ( | ) | const |
Returns the time of the event.