how to know if folder contents have changed

devnew at gmail.com devnew at gmail.com
Mon Nov 12 00:03:33 EST 2007


hi
i am trying to create a cache of  digitized values of  around 100
image files in a folder..In my program i would like to know from time
to time if a new image has been added or removed from the folder..

one scheme suggested was to create a string from the names of sorted
image files and give it as  the cache name..
ie ,if i have one.jpg,three.jpg,new.jpg  ,
i will name the cache as 'newonethree.cache'  and  everytime i want to
check if new image added/removed  i wd create a string from the
contents of folder and compare it with cachename.

this scheme is ok for a small number of files,..

can someone suggest a better way? i know it is a general programming
problem..but i wish to know if a python solution exists




More information about the Python-list mailing list