1 #include <msp/core/algorithm.h>
2 #include "filemonitor.h"
3 #include "filemonitor_platform.h"
10 FileMonitor::FileMonitor():
11 priv(new Private(*this)),
15 FileMonitor::~FileMonitor()
20 void FileMonitor::use_event_dispatcher(IO::EventDispatcher &ed)
23 throw logic_error("event_disp!=0");
26 platform_use_event_dispatcher();
29 void FileMonitor::add_file(const FS::Path &path)
33 file.modified = false;
35 files.push_back(file);
38 void FileMonitor::remove_file(const FS::Path &path)
40 auto i = find_member(files, path, &MonitoredFile::path);
44 if(&*i!=&files.back())