libfswatch  1.9.3
Public Member Functions | Static Public Member Functions | List of all members
fsw::event Class Reference

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_flagget_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...
 

Detailed Description

Type representing a file change event.

This class represents a file change event in the libfswatch API. An event contains:

Constructor & Destructor Documentation

fsw::event::event ( std::string  path,
time_t  evt_time,
std::vector< fsw_event_flag flags 
)

Constructs an event.

Parameters
pathThe path the event refers to.
evt_timeThe time the event was raised.
flagsThe vector of flags specifying the type of the event.
fsw::event::~event ( )
virtual

Destructs an event.

This is a virtual destructor that performs no operations.

Member Function Documentation

fsw_event_flag fsw::event::get_event_flag_by_name ( const std::string &  name)
static

Get event flag by name.

Parameters
nameThe name of the event flag to look for.
Returns
The event flag whose name is name, otherwise
Exceptions
libfsw_exceptionif no event flag is found.
string fsw::event::get_event_flag_name ( const fsw_event_flag flag)
static

Get the name of an event flag.

Parameters
flagThe event flag.
Returns
The name of flag.
Exceptions
libfsw_exceptionif no event flag is found.
vector< fsw_event_flag > fsw::event::get_flags ( ) const

Returns the flags of the event.

Returns
The flags of the event.
string fsw::event::get_path ( ) const

Returns the path of the event.

Returns
The path of the event.
time_t fsw::event::get_time ( ) const

Returns the time of the event.

Returns
The time of the event.

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