zeus::TFileSystemWatcher Class Reference

#include <FileSystemWatcher.h>

Inheritance diagram for zeus::TFileSystemWatcher:

zeus::TZObject zeus::IRunnable zeus::ISubject zeus::IZUnknown zeus::IZUnknown zeus::IZUnknown

List of all members.

Public Member Functions

 TFileSystemWatcher (const IString &rPath, bool bIncludeSubTree=true)
void start ()
void stop ()
bool isStarted () const
void reset ()
TString getWatchedPath () const
virtual Retval MQUALIFIER attach (IObserver &rObserver)
virtual Retval MQUALIFIER detach (IObserver &rObserver)
virtual Retval MQUALIFIER askForInterface (Uint uiInterfaceID, IZUnknown *&rpIface)
virtual void MQUALIFIER addRef () const
virtual void MQUALIFIER release () const

Protected Member Functions

virtual ~TFileSystemWatcher ()
virtual void MQUALIFIER execute ()
virtual void onFileCreated (const IString &rFileName)
virtual void onFileRemoved (const IString &rFileName)
virtual void onFileChanged (const IString &rFileName)
virtual void onFileRenamed (const IString &rOldFileName, const IString &rNewFileName)
virtual void onUnknownAction (const IString &rFileName)


Detailed Description

This class watches a file system and generates call backs. The call backs are posted using a communication pipe

Constructor & Destructor Documentation

TFileSystemWatcher::TFileSystemWatcher ( const IString rPath,
bool  bIncludeSubTree = true 
)

Creates a file system watcher

Parameters:
rPath : Name of the directory

TFileSystemWatcher::~TFileSystemWatcher (  )  [protected, virtual]

Destroys the file system watcher


Member Function Documentation

void TFileSystemWatcher::start (  ) 

Starts the file watching process

void TFileSystemWatcher::stop (  ) 

Stopps the file watching process

bool zeus::TFileSystemWatcher::isStarted (  )  const [inline]

Checks if the watcher has been started

void TFileSystemWatcher::reset (  ) 

Resets the file system watcher. All files are posted to the observers

TString zeus::TFileSystemWatcher::getWatchedPath (  )  const [inline]

Returns the path of the file system watcher

Retval MQUALIFIER TFileSystemWatcher::attach ( IObserver rObserver  )  [virtual]

See also:
ISubject::attach

Implements zeus::ISubject.

Retval MQUALIFIER TFileSystemWatcher::detach ( IObserver rObserver  )  [virtual]

See also:
ISubject::detach

Implements zeus::ISubject.

virtual Retval MQUALIFIER zeus::TFileSystemWatcher::askForInterface ( Uint  uiInterfaceID,
IZUnknown *&  rpIface 
) [virtual]

Reimplemented from zeus::TZObject.

virtual void MQUALIFIER zeus::TFileSystemWatcher::addRef (  )  const [virtual]

See also:
IZUnknown::addRef

Reimplemented from zeus::TZObject.

virtual void MQUALIFIER zeus::TFileSystemWatcher::release (  )  const [virtual]

See also:
IZUnknown::release

Reimplemented from zeus::TZObject.

void MQUALIFIER TFileSystemWatcher::execute (  )  [protected, virtual]

See also:
IRunnable::execute

Implements zeus::IRunnable.

void TFileSystemWatcher::onFileCreated ( const IString rFileName  )  [protected, virtual]

Callback if a file has been created

Parameters:
rFileName : Name of the file

void TFileSystemWatcher::onFileRemoved ( const IString rFileName  )  [protected, virtual]

Callback if a file has been deleted

Parameters:
rFileName : Name of the file

void TFileSystemWatcher::onFileChanged ( const IString rFileName  )  [protected, virtual]

Callback if a file has been changed

Parameters:
rFileName : Name of the file

void TFileSystemWatcher::onFileRenamed ( const IString rOldFileName,
const IString rNewFileName 
) [protected, virtual]

Callback if a file has been renamed

Parameters:
rOldFileName : old file name
rNewFileName : new file name

void TFileSystemWatcher::onUnknownAction ( const IString rFileName  )  [protected, virtual]

Unknown action on file

Parameters:
rFileName : Name of the file


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


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Wed Oct 28 21:42:34 2009