[REBOL] Re: How to access files ' properties under Windows
From: holger::rebol::net at: 19-Apr-2002 10:57
On Fri, Apr 19, 2002 at 07:26:41PM +0200, Petr Krenzelok wrote:
> why does not 'get-modes directly return an object, as for e.g. errors
> do? Wouldn't it simplify the way it works? You return the block of words
> anyway, as seen in the first case, so it could be:
>
> modes: get-modes %user.r 'file-modes
> modes/creation-date
> ; or even checking ...
> if word? in modes 'creation date [modes/creation-date]
>
> ... looks better than:
> modes: context get-modes %user.r get-modes %user.r 'file-modes
The problem with that is that on some platforms getting some of those
settings can take a non-trivial amount of time, e.g. certain types of
file properties with network-mounted filesystems. You don't want the
OS to spend a lot of time getting modes that you are not interested
in. The other problem with this is that for setting the modes you would
have to pass in the whole object, and then set-modes would somehow
have to figure out which modes have changed. Not very practical.
> Well, just my opinion :-) ... but Holger, I have to ask anyway - will it
> be changed for Core 2.6? :-)
No. A few modes may be added though, here and there.
--
Holger Kruse
[kruse--nordicglobal--com]