[Ecls-list] open :supersede and rename-file advise

Geo Carncross geocar at gmail.com
Fri Nov 30 02:33:43 UTC 2007


On Nov 29, 2007 5:18 PM, Richard M Kreuter <kreuter at progn.net> wrote:
> There's another class of details that occurred to me today.  When you
> open a Unix file destructively, hard links, permissions, ownerships, and
> maybe some other metadata are preserved.  When you create a fresh file,
> you get new permissions, ownerships, etc.  So there are some decisions
> to make:
>
> * Do you try set metadata on the freshly created write-beside file to
>   match the file you will eventually supersede?

I don't think we can.

UNIX metadata isn't merely meta, but usually an integral part of the
protocols robust applications use in order to achieve certain things.
I've never seen *users* make use of anything except mtime, and I think
the goal of a open/write/create system that doesn't destroy data is to
do what the user using the application expects- even if it's different
than what the programmer would do. Most times, the programmer doesn't
care and simply fails to go through the necessary contortions just
because they're lazy. Users consequently end up with lowered
expectations.

So no, this :supersede (or whatever we call it) should NOT attempt to
pose as :truncate but "different underneith", but instead as "what the
user expects should be the result to replace the file with a new
version"

At least, that's my thinking.




More information about the ecl-devel mailing list