Using "Unix.stat" works perfectly for my purpose! On both platforms, hurray! THANK YOU! On 10/22/07, 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: > > let modtime file = > let filedata = Unix.stat file in > filedata.Unix.st_mtime > > > In a loop, compare the modtime to the previous modtime, then > Unix.sleep 1; >