1 #ifndef _Belle2_Inotify_hh
2 #define _Belle2_Inotify_hh
4 #include "daq/slc/system/FileDescriptor.h"
21 : m_wd(-1), m_mask(-1), m_name() {}
25 InotifyEvent(
int wd,
unsigned long mask,
const std::string& name)
26 : m_wd(wd), m_mask(mask), m_name(name) {}
29 int get_wd()
const {
return m_wd;}
30 unsigned long getMask()
const {
return m_mask; }
31 const std::string& getName()
const {
return m_name; }
40 typedef std::vector<InotifyEvent> InotifyEventList;
45 static const unsigned long FILE_CREATE;
46 static const unsigned long FILE_OPEN;
47 static const unsigned long FILE_CLOSE_WRITE;
48 static const unsigned long FILE_CLOSE_NOWRITE;
49 static const unsigned long FILE_DELETE;
50 static const unsigned long FILE_MODIFY;
51 static const unsigned long FILE_ACCESS;
52 static const unsigned long FILE_ATTRIB;
60 int add(
const std::string& path,
unsigned long mask);
62 InotifyEventList wait(
int sec);