MCPcopy Create free account
hub / github.com/crownengine/crown / start

Method start

src/core/filesystem/file_monitor_linux.cpp:118–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116 }
117
118 void start(u32 num, const char **paths, bool recursive, FileMonitorFunction fmf, void *user_data)
119 {
120 CE_ENSURE(NULL != fmf);
121
122 _recursive = recursive;
123 _function = fmf;
124 _user_data = user_data;
125
126 _fd = inotify_init();
127
128 if (_fd == -1)
129 return;
130
131 for (u32 i = 0; i < num; ++i)
132 add_watch(paths[i], recursive);
133
134 _thread.start([](void *thiz) { return static_cast<FileMonitorImpl *>(thiz)->watch(); }, this);
135 }
136
137 void stop()
138 {

Callers

nothing calls this directly

Calls 2

startMethod · 0.45
watchMethod · 0.45

Tested by

no test coverage detected