#include <nap/directorywatcher.h>
Public Member Functions | |
DirectoryWatcher (const std::string &directory) | |
~DirectoryWatcher () | |
bool | update (std::vector< std::string > &modifiedFiles) |
Monitors file changes in a directory and its subdirectories. (currently hardcoded to active directory (cwd), and hardcoded to respond to file 'writes'). This class works polling-based, so continue to call update to retrieve what files are modified on disk.
DirectoryWatcher | ( | const std::string & | directory | ) |
directory | the directory to watch |
~DirectoryWatcher | ( | ) |
bool update | ( | std::vector< std::string > & | modifiedFiles | ) |
Checks if any changes to files were made, returns true if so. Continue to call this function to retrieve multiple updates.
modifiedFiles | the filenames of the files that were modified. |