WANTED: logging of all file operations on Windows

Paul McGuire ptmcg at austin.rr._bogus_.com
Sun Jul 9 13:48:19 EDT 2006


"faulkner" <faulkner612 at comcast.net> wrote in message
news:1152460915.363598.268980 at b28g2000cwb.googlegroups.com...
> you want a directory watching daemon. it isn't hard at all to build
> from scratch.
> first, determine which directories should be watched.
> then, os.walk each directory, building a mapping from filename to mtime
> [modified time; os.path.getmtime].
> next is your main event loop. this while loop consists of os.walk-ing
> each directory again, comparing the current mtime to the corresponding
> entry in the mapping. if they differ, or if a filename isn't in the
> mapping, something happened, at which point you can logick out whether
> a file was moved, deleted, changed, or created.
>
> so many folks have looked for this that i'll just write a generic one
> and put it in the cheeseshop. look for "dirmon" in about a week.
>
>

While I am a fan of "brute force"





More information about the Python-list mailing list