Reputation: 940
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?
Upvotes: 6
Views: 947
Reputation: 11636
You could also use Qt and its QFileSystemWatcher class which can be used quite easily.
Upvotes: 2
Reputation: 399713
Look into inotify, I think it's still current.
You can also use a wrapping API, such as glib's GIO GFileMonitor.
Upvotes: 4
Reputation: 798486
Program against FAM. On current Linux systems this service is provided by gamin or a similar application.
Upvotes: 3