Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

OW32::CDirectoryWatch Class Reference

This class represents encapsulates ReadDirectoryChangesW. More...

#include <DirectoryWatch.h>

Inheritance diagram for OW32::CDirectoryWatch:

OW32::CIoCompletion OW32::CRefCounted OW32::CRefCountedBase List of all members.

Public Member Functions

 IMPLEMENT_IO_COMPLETION (CDirectoryWatch)
 CDirectoryWatch (CDirectoryWatchCallback *callback, CIoCompletionThreadPool &ioCompletionPool, const ci_wstring &directoryName, DWORD changesMask=FILE_NOTIFY_CHANGE_LAST_WRITE|FILE_NOTIFY_CHANGE_FILE_NAME)
 Constructor creating a new directory watch.
virtual ~CDirectoryWatch ()
 D'tor.
const ci_wstring & getDirectory () const
 Return the monitored directory.
void cancel ()
 Cancel monitoring.

Detailed Description

This class represents encapsulates ReadDirectoryChangesW.

It handles IOCP notifications, and automatically posts more change notification requests until the watch is cancelled or watching fails (e.g. due to directory deletion).

Only one callback is allowed, use #CFileWatcher (which builds on this) to allow watches on single files piggy-backed on a single ReadDirectoryChangesW call.


Constructor & Destructor Documentation

OW32::CDirectoryWatch::CDirectoryWatch CDirectoryWatchCallback callback,
CIoCompletionThreadPool ioCompletionPool,
const ci_wstring &  directoryName,
DWORD  changesMask = FILE_NOTIFY_CHANGE_LAST_WRITE|FILE_NOTIFY_CHANGE_FILE_NAME
 

Constructor creating a new directory watch.

Parameters:
callback The callback to pass notifications to
ioCompletionPool The IOCP thread pool
directoryName The directory path to monitor
changesMask The changes to report


The documentation for this class was generated from the following file:
Generated on Sun Jun 5 01:29:24 2005 for OW32 by  doxygen 1.3.9.1