1 #ifndef MSP_FS_FILEMONITOR_H_
2 #define MSP_FS_FILEMONITOR_H_
4 #include <msp/core/mspcore_api.h>
5 #include <msp/core/noncopyable.h>
6 #include <msp/fs/path.h>
7 #include <msp/io/eventdispatcher.h>
12 class MSPCORE_API FileMonitor: NonCopyable
20 bool modified = false;
25 sigc::signal<void, const FS::Path &> signal_file_modified;
28 Private *priv = nullptr;
29 IO::EventDispatcher *event_disp = nullptr;
30 std::vector<MonitoredFile> files;
36 void add_file(const FS::Path &);
37 void remove_file(const FS::Path &);
39 void prepare_file(MonitoredFile &);
40 void cleanup_file(MonitoredFile &);
43 void use_event_dispatcher(IO::EventDispatcher &);
45 void platform_use_event_dispatcher();
49 void tick(const Msp::Time::TimeDelta &);