Detecting dir (tree) changes fast?

R

robert

I want to detect changes in a directory tree fast with minimum
overhead/load. In order to check the need for sync tasks at high
frequency.
It must not be 100% reliable (its also forced time periodic), so
kind of hashing would be ok.
How?


Robert
 
S

Steven D'Aprano

I want to detect changes in a directory tree fast with minimum
overhead/load. In order to check the need for sync tasks at high
frequency.
It must not be 100% reliable (its also forced time periodic), so kind of
hashing would be ok.
How?

Google is your friend. Googling for "python directory watcher" gives the
following top three links:

http://www.amk.ca/python/simple/

http://timgolden.me.uk/python/win32_how_do_i/
watch_directory_for_changes.html
(sorry for the broken URL)

http://code.activestate.com/recipes/217829/


There are probably many others. Which one is most suitable will depend on
the details of, e.g. the OS you are using, the types of changes you're
expecting, how many files are in the directory.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top