Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXDirWatch Class Reference

Watches one or more directories (on Linux, also files..). More...

#include <FXDirWatch.h>

Inheritance diagram for FX::FXDirWatch:

Public Types

enum  { ID_CHANGE =1, ID_LAST }

Public Member Functions

long onMessage (FXObject *, FXSelector, void *)
 FXDirWatch (FXApp *a=nullptr, FXObject *tgt=nullptr, FXSelector sel=0)
 Initialize directory watcher.
FXAppgetApp () const
 Get application pointer.
void setTarget (FXObject *t)
 Set the message target object.
FXObjectgetTarget () const
 Get the message target object.
void setSelector (FXSelector sel)
 Set the message identifier.
FXSelector getSelector () const
 Get the message identifier.
FXbool addWatch (const FXString &path)
 Add path to watch; return true if added.
FXbool remWatch (const FXString &path)
 Remove path to watch; return true if removed.
FXbool clearAll ()
 Clear all watches.
virtual ~FXDirWatch ()
 Clean up directory watcher.
- Public Member Functions inherited from FX::FXObject
const FXchar * getClassName () const
 Get class name of some object.
FXbool isMemberOf (const FXMetaClass *metaclass) const
 Check if object is member of metaclass.
virtual long tryHandle (FXObject *sender, FXSelector sel, void *ptr)
 Try handle message safely, catching certain exceptions.
virtual long onDefault (FXObject *, FXSelector, void *)
 Called for unhandled messages.
virtual void save (FXStream &store) const
 Save object to stream.
virtual void load (FXStream &store)
 Load object from stream.
virtual ~FXObject ()
 Virtual destructor.

Protected Attributes

FXInputHandle hnd
FXDictionary pathToHandle
FXReverseDictionary handleToPath
FXTime timestamp
FXSelector message

Detailed Description

Watches one or more directories (on Linux, also files..).

Issue messages when one of them was changed. Each path has a corresponding handle which is used to interact with the operating system.

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

Copyright © 1997-2022 Jeroen van der Zijp