1 #ifndef MSP_FS_FILEMONITOR_PLATFORM_H_
2 #define MSP_FS_FILEMONITOR_PLATFORM_H_
4 #include <msp/fs/path.h>
5 #include <msp/io/eventobject.h>
6 #include "filemonitor.h"
11 class INotify: public IO::EventObject
20 int add_watch(const FS::Path &, int);
21 void remove_watch(int);
23 void set_block(bool) override { }
24 void set_inherit(bool) override { }
27 std::size_t do_write(const char *, std::size_t) override;
28 std::size_t do_read(char *, std::size_t) override;
31 const IO::Handle &get_handle(IO::Mode) override { return fd; }
32 const IO::Handle &get_event_handle() override { return fd; }
36 struct FileMonitor::Private
41 Private(FileMonitor &);
43 void events_available();