Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
How to monitor a specific file for changes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-10-24 (12:55)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] How to monitor a specific file for changes
On Mon, Oct 22, 2007 at 12:42:28PM -0700, Karl Zilles wrote:
> Orlin Grigorov wrote:
> >Oh, here's another idea---every certain amount of time, I just compare 
> >my last saved version of the file to the current one---if different, 
> >there's my event.   What do you think?
> Just stat it.  You can stat it every second and never notice any 
> performance issue.  In fact you can stat a whole directory of files 
> every second and never notice.  It'll work cross platform, and it's easy:

/me weeps.

Please don't do this.  Processes which regularly poll are a bane for
people who are working to reduce the power consumption of laptops and


Richard Jones
Red Hat