This is the mail archive of the cygwin@sourceware.cygnus.com 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]

How to set directory time stamps?


I am trying to port a program which depends on being able to update
directory time stamps. Using GNU-Win32 b18 (with various patches
applied), updating the time stamps of a plain file works. But I
did not succeed to update the time stamps of a directory (Windows NT
4.0 on Pentium II, FAT filesystem):

	bash-2.01$ mkdir TEST
	bash-2.01$ touch TEST
	touch: TEST: Permission denied

The same problem appears for a C program using:

	utime(directoryName, NULL);

(perror() returns something like "Is a directory".) NuTCRACKER fails
too, Microsoft's "_utime()" doesn't work, but the MKS Toolkit "touch"
command works flawlessly (...so it is do-able after all!). Somebody
indicated to me that using "backup semantics to open the directory"
and using "SetFileTime on that handle" should work. Well, I just
entered the Microsoft World of programming. Part two sounds familiar,
but what is "backup semantics"? Any help on solving the mystery of NT
directory time stamp updates would be greatly appreciated!  
--
  __                                     _
 |  )      o       |              |     | \            |        |
 | /    _          |_   _    _   _|     |  |           |     _  |
 |/\   /_) |  ^ ^  | |  _)  |   / |     |  | | |  ^ ^  |_)  /_) |
 |  \_/\___|_| | |_| |_(_|__|___\_|     |_/__|_|_| | |_| \_/\___|

 Department of Chemistry                Office: (801) 581-5894
 2020 Henry Eyring Building b125        Home:   (801) 582-7516         
 University of Utah                     FAX:    (801) 581-8433         
 Salt Lake City, UT 84112               dunkel@chemistry.utah.edu 
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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