I have a directory of files on my Ubuntu machine. I run python 2.6. All of these files are represented in a database for purposes of sorting, searching, locating, etc. I'd like to trigger a python script every time a file is added or modified to update said database.
basically, upon adding, moving, deleting, or renaming a file, a script would be called to make update
queries to SQL database.
similar post here. however, I would like to directly feed such a file into a script - plus I was confused - pynotify or gio? what can detect deleted files? doesn't seem like these are best.
any ideas on how to do this?