#include <inotify-cxx.h>
Public Member Functions | |
Inotify () | |
Constructor. | |
~Inotify () | |
Destructor. | |
void | Close () |
Removes all watches and closes the inotify device. | |
bool | IsReady () const |
Checks whether the inotify is ready. | |
bool | Add (InotifyWatch *pWatch) |
Adds a new watch. | |
bool | Add (InotifyWatch &rWatch) |
Adds a new watch. | |
void | Remove (InotifyWatch *pWatch) |
Removes a watch. | |
void | Remove (InotifyWatch &rWatch) |
Removes a watch. | |
void | RemoveAll () |
Removes all watches. | |
size_t | GetWatchCount () const |
Returns the count of watches. | |
bool | WaitForEvents (bool fNoIntr=false) |
Waits for inotify events. | |
int | GetEventCount () |
Returns the count of received and queued events. | |
bool | GetEvent (InotifyEvent *pEvt) |
Extracts a queued inotify event. | |
bool | GetEvent (InotifyEvent &rEvt) |
Extracts a queued inotify event. | |
bool | PeekEvent (InotifyEvent *pEvt) |
Extracts a queued inotify event (without removing). | |
bool | PeekEvent (InotifyEvent &rEvt) |
Extracts a queued inotify event (without removing). | |
InotifyWatch * | FindWatch (int iDescriptor) |
Searches for a watch. |
|
Constructor. Creates and initializes an instance of inotify communication object (opens the inotify device). |
|
Destructor. Calls Close() due for clean-up. |
|
Adds a new watch.
|
|
Adds a new watch.
|
|
Removes all watches and closes the inotify device.
|
|
Searches for a watch. It tries to find a watch by the given descriptor.
|
|
Extracts a queued inotify event. The extracted event is removed from the queue.
|
|
Extracts a queued inotify event. The extracted event is removed from the queue. If the pointer is NULL it does nothing.
|
|
Returns the count of received and queued events. This number is related to the events in the queue inside this object, not to the events pending in the kernel.
|
|
Returns the count of watches.
|
|
Checks whether the inotify is ready.
|
|
Extracts a queued inotify event (without removing). The extracted event stays in the queue.
|
|
Extracts a queued inotify event (without removing). The extracted event stays in the queue. If the pointer is NULL it does nothing.
|
|
Removes a watch. If the given watch is not present it does nothing.
|
|
Removes a watch. If the given watch is not present it does nothing.
|
|
Removes all watches.
|
|
Waits for inotify events. It waits until one or more events occur.
|