If I have a table representing the paths and sizes of files / subdirectories inside directory A, how can I detect recursive changes in directory A so that I can efficiently update the table?
I am using watchdog , which is a python library for this kind of thing. If you want to know how they do it, you can dive into the source code of the project.
If you are using linux, use pyinotify