1 #include <msp/core/algorithm.h>
2 #include "filemonitor.h"
3 #include "filemonitor_platform.h"
10 FileMonitor::FileMonitor():
11 priv(new Private(*this))
14 FileMonitor::~FileMonitor()
19 void FileMonitor::use_event_dispatcher(IO::EventDispatcher &ed)
22 throw logic_error("event_disp!=nullptr");
25 platform_use_event_dispatcher();
28 void FileMonitor::add_file(const FS::Path &path)
33 files.push_back(file);
36 void FileMonitor::remove_file(const FS::Path &path)
38 auto i = find_member(files, path, &MonitoredFile::path);
42 if(&*i!=&files.back())