This is the mail archive of the cygwin-talk mailing list for the cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: stat(2) of a directory


On Sun, Mar 05, 2006 at 02:45:55AM +0000, Eric Blake wrote:
> > 	Under *nix, I can use stat(2) of a directory to know when its
> > 	contents have changed (file added or deleted from it).
> > 
> > 	Under cygwin, this doesn't work because a directory's
> > 	modification time doesn't change when its contents change.
> > 
> > 	Any recommendations as to how to monitor a directory to know
> > 	when its contents change under cygwin?
> 
> On Win9x, this is basically impossible, since Windows does not
> provide that capability (try it - touch . is a noop on cygwin on
> Win9x).  On Windows NT, the capability exists, but since
> Windows itself is not doing the timestamp update, it would
> severely slow cygwin down to open the directory and touch the
> directory's timestamp on every open or unlink, just to implement
> this requirement of POSIX/SUSv3 properly.  It has been suggested
> in the past that perhaps a 'CYGWIN=posixly_correct' option
> be added that does all these slower corner cases, but no one
> has bothered to implement it.

Surely we're brave enough to use the originally sugggested
"posix_me_harder".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]