Mail Archives: djgpp/2001/06/06/09:45:04
Eli Zaretskii wrote:
> _chmod (and thus also chmod) works on directories as well; you can
> change the read-only, system, and hidden attributes of a directory.
> Note that DOS ignores the read-only attribute of a directory (e.g.,
> rmdir will still nuke it), but ported Posix programs which look at the
> write bit will honor it anyway.
>
> As for the time stamp of a directory, DOS doesn't let you change that.
> The date and time of a directory are determined by DOS when the
> directory is first created, and thereafter never change. All DOS
> functions which set data and time of files, including the functions
> from the LFN API, want a file handle, and since you cannot open a
> directory to get a handle, you cannot change the time stamp via DOS.
> The only possibility to work around this is to access the disk on the
> sector level with BIOS calls or Int 26h, but that's hardly worth the
> hassle.
Thanks for clarifying this. I misinterpreted the sentence about
directory and volume attributes in info alfa libc _chmod:
Note that the
directory and volume attribute bits must always be 0 when `_chmod()' is
called with FUNC = 1, or else the call will fail.
--
Gruss Waldemar Schultz. schultz AT ma DOT tum DOT de
Technische Universität München, Zentrum Mathematik M1, D 80290 München
Tel: +49 (0)89 2892 8226 FAX: +49 (0)89 2892 8228
- Raw text -