#include <cFileChangeWatch.h>
Get notifications that some element of a directory has changed in some way. look for local external file changes by calling waitForFileChanges() http://www.linuxjournal.com/article/8478 Similar to .NET FileSystemWatcher, inotify,
◆ cFileChangeWatch()
GrayLib::cFileChangeWatch::cFileChangeWatch |
( |
| ) |
|
◆ ~cFileChangeWatch()
GrayLib::cFileChangeWatch::~cFileChangeWatch |
( |
void |
| ) |
|
|
virtual |
◆ addFileChangeWatch()
Add a file or directory to the list of objects i am watching. directory can be recursive.
◆ createFileChangeWatch()
Override this to add a new thing to watch. Called form addFileChangeWatch
◆ hasFileChangeWatch()
bool GrayLib::cFileChangeWatch::hasFileChangeWatch |
( |
const FILECHAR_t * |
pszDir | ) |
const |
◆ isValidFileChangeWatch()
bool GrayLib::cFileChangeWatch::isValidFileChangeWatch |
( |
| ) |
const |
|
inlinenoexcept |
◆ removeAllFileChangeWatches()
void GrayLib::cFileChangeWatch::removeAllFileChangeWatches |
( |
| ) |
|
◆ removeFileChangeWatch()
HRESULT GrayLib::cFileChangeWatch::removeFileChangeWatch |
( |
const FILECHAR_t * |
pszDir | ) |
|
remove a file from the watch list.
- Returns
- number of children also removed for FILE_CHANGE_RECURSIVE
◆ UNITTEST_FRIEND()
◆ waitForFileChanges()
report any changes to the file/dir(s) being watched.
- nWaitDelay = mSec wait for changes. pChangeList = return list of full paths to things that changed. nullptr = don't care.
- Returns
- Number of changes to files since last call. <0 = error HRESULT_WIN32_C(ERROR_BUFFER_OVERFLOW) = too many changes to list.
◆ m_aWatches
FindFirstChangeNotification. can use WaitForMultipleObjects() etc on this.
The documentation for this class was generated from the following files: