Is there anything in the standard library to help writing a file watcher?

Benjamin Thaut code at benjamin-thaut.de
Thu May 23 08:35:19 PDT 2013


Am 23.05.2013 17:26, schrieb Gary Willoughby:
> Is there anything in the standard library to help writing a file
> watcher? I want to monitor a single file for changes and if a change is
> detected call a function. Is there any existing libraries to do this in
> D as it must be cross-platform as much as possible?

I have something like this implemented for windows. It watches a entire 
directory including subdirectories (optional) and tells you which files 
changed upon request:

https://github.com/Ingrater/thBase/blob/master/src/thBase/directory.d

I don't think its possible to imiplement this cross-plattform. You will 
have to reimplement for every plattform you need it on.

Kind Regards
Benjamin Thaut


More information about the Digitalmars-d-learn mailing list