25 CFileSystemWatcher::TFileSystemChangeList::iterator it;
29 printf(
"Watching directory '.'...\n Press any key to exit.\n");
33 watch.getChanges(lstChanges);
35 for (it = lstChanges.begin(); it != lstChanges.end(); it++)
37 cout <<
"changed: '" << it->path <<
"' ";
38 if (it->isDir) cout <<
"isDir ";
39 if (it->eventModified) cout <<
"modified ";
40 if (it->eventCloseWrite) cout <<
"close_write ";
41 if (it->eventDeleted) cout <<
"deleted ";
42 if (it->eventMovedTo) cout <<
"moved_to ";
43 if (it->eventMovedFrom) cout <<
"moved_from ";
44 if (it->eventCreated) cout <<
"created ";
45 if (it->eventAccessed) cout <<
"accessed";
50 std::this_thread::sleep_for(100ms);
61 catch (
const std::exception& e)