Status dir_watch_Poll(DirWatchNotifications& notifications) { if ( g_Stream == NULL ) { g_Stream = CreateEventStream( g_RootPaths ); } else { for ( DirWatchNotifications::iterator it = g_QueuedDirs.begin() ; it != g_QueuedDirs.end(); ++it) notifications.push_back(DirWatchNotification( *it )); g_QueuedDirs.clear(); } return INFO::OK; }