Mail Archives: djgpp/2000/07/13/02:38:03
On Wed, 12 Jul 2000 sami3079 AT my-deja DOT com wrote:
> I still have one problem, how to change directory's modification
> (and maybe access) timestamp
You can't, sorry. For some reason which evades me, DOS and Windows
don't let programs access directories with most of the functions
allowed with files.
The directory's time stamp is determined when it is created, and never
changes after that, no matter what you do. The modification time
doesn't change either, even if you add/remove files to the directory
(which clearly involves modifications to directory file's contents).
The only possible way of working around that is to access the disk at
the sector (BIOS) level, but I doubt if the application you have in
mind really justifies such drastic measures. Direct disk accesses are
both slow (because there's no easy way of finding the right cluster
except to trace the entire path starting from root) and complicated
(e.g., on Windows, you need to lock the volume before you can write to
a sector, which is a very slow operation).
- Raw text -