8#ifndef _Belle2_Inotify_hh
9#define _Belle2_Inotify_hh
11#include "daq/slc/system/FileDescriptor.h"
28 : m_wd(-1), m_mask(-1), m_name() {}
32 InotifyEvent(
int wd,
unsigned long mask,
const std::string& name)
33 : m_wd(wd), m_mask(mask), m_name(name) {}
36 int get_wd()
const {
return m_wd;}
37 unsigned long getMask()
const {
return m_mask; }
38 const std::string& getName()
const {
return m_name; }
47 typedef std::vector<InotifyEvent> InotifyEventList;
52 static const unsigned long FILE_CREATE;
53 static const unsigned long FILE_OPEN;
54 static const unsigned long FILE_CLOSE_WRITE;
55 static const unsigned long FILE_CLOSE_NOWRITE;
56 static const unsigned long FILE_DELETE;
57 static const unsigned long FILE_MODIFY;
58 static const unsigned long FILE_ACCESS;
59 static const unsigned long FILE_ATTRIB;
67 int add(
const std::string& path,
unsigned long mask);
69 InotifyEventList wait(
int sec);
Abstract base class for different kinds of events.