1 #include <msp/core/algorithm.h>
2 #include <msp/core/except.h>
3 #include "filemonitor.h"
4 #include "filemonitor_platform.h"
11 FileMonitor::FileMonitor():
12 priv(new Private(*this))
15 FileMonitor::~FileMonitor()
20 void FileMonitor::use_event_dispatcher(IO::EventDispatcher &ed)
23 throw already_called("FileMonitor::use_event_dispatcher");
26 platform_use_event_dispatcher();
29 void FileMonitor::add_file(const FS::Path &path)
34 files.push_back(file);
37 void FileMonitor::remove_file(const FS::Path &path)
39 auto i = find_member(files, path, &MonitoredFile::path);
43 if(&*i!=&files.back())