Hello! I am looking for a way to make a program in C or C++ that detects if there was any files altered, renamed, moved or deleted in a specified directory for Linux systems. Is there a way to do that?
+1
A:
Program against FAM. On current Linux systems this service is provided by gamin or a similar application.
Ignacio Vazquez-Abrams
2010-08-27 14:35:04
I *think* FAM is deprecated, and that you should use inotify instead. Am I right?
static_rtti
2010-08-27 14:36:55
FAM as a program is deprecated, but its *interface* is still provided by gamin.
Ignacio Vazquez-Abrams
2010-08-27 14:39:05
Thanks, i will explore this possibility
petermlm
2010-08-27 14:41:10
Is there any reason to use gamin instead of inotify directly? (cross-platform compatibility maybe?)
static_rtti
2010-08-27 14:45:51
Yes, cross-platform compatibility would be the big reason. Not to a lot of platforms mind you, but better than just recentish versions of one.
Ignacio Vazquez-Abrams
2010-08-27 14:49:41
+3
A:
Look into inotify, I think it's still current.
You can also use a wrapping API, such as glib's GIO GFileMonitor.
unwind
2010-08-27 14:43:32