W3C home > Mailing lists > Public > w3c-dist-auth@w3.org > April to June 1999

Re: Fun with Moves and Copy

From: Kevin Wiggen <wiggs@wiggenout.com>
Date: Mon, 19 Apr 1999 10:12:53 -0700
Message-ID: <007801be8a87$df4965e0$61c766d8@pacbell.net>
To: "Geoffrey M. Clemm" <gclemm@tantalum.atria.com>
Cc: <w3c-dist-auth@w3.org>
>>>Using the term "move" for a "merge" is rather bogus, but with the
>>>prefacing statement, the user will know what they meant.

>>>Here I'll disagree strongly.  A "move" (i.e. "rename") command is
essential.
>>>A merge command is useful, but not a replacement for move.


Ahhh....

The spec makes more sense when read that "Move" is a "Rename".  But then
what is a "Copy"????  Is it a rename or a Copy??  This is confusing.

I feel that Move and Copy should be made to be "Merge" type functions.  The
overwrite flag allows for the "Rename", its simply a Move with overwrite set
to "F".  In this case, if a file exists, it tells you it cannot rename to a
file that already exists...

I see a few possibilities in desired functionality.

1)  A person wants to "Rename" a file or directory.  The Webdav client
issues a "Move" with the overwrite flag set to "F".  This will cause the
"Rename" to succeed if no file exists, or to fail if the file does exist.
At this point the user can do a delete to get rid of the older file or dir,
or simply not do the move.  (A Webdav client could also implement the delete
then move if that IS the desired functionality, but the server won't do this
on its own).

2)  The person wants to "Move/Merge" files.  Webdav client issues the "Move"
with overwrite to "F".  If the file exists, an error is returned.  This
gives the client the chance to ask the user if she wants to
"Overwrite/Merge" the files into the existing directory (or replace the
existing file if this is at the file level).  Then the overwrite = "T" will
do the merge.

3)  The person wants to "Copy/Merge".  This works just like number 2, except
for copies of the files are made at the destination instead of "Moving" the
originals.

4)  The person wants to "Move/Replace" the existing files.  If the Webdav
client supports this, it can simply do a "Move" with overwrite to "F".  When
the Webdav client gets the error, it can issue the "DELETE", then do the
"MOVE".  No functionality lost.  Or the Webdav client can make the User
issue the delete, this way the user won't loose any files unknowingly.  The
Webdav client also has time to respond to an error during the "Delete"
phase, it could decide not to do the move and give a valid response to the
user.

5)  "Copy/Replace" see number 4.

In this way the Spec will be able to do what it does today, AND have the
merge functionality.  This means that we won't need another method type put
into HTTP.  A client can then implement #1-5 above by simply issuing Webdav
commands.

If we stick with the spec, there will be long-term confusion and problems
with permissions and locking on the "Delete" phase of Move/Copy.  I believe
it far safer (and more understandable to the user) to have Move/Copy do
merges.    I also believe that the use-case of merge will be used far more
than the complete replace.

If the move is accross servers http://foo/bar to http://foobar/fee/bar the
only way the server can do this is by doing a "Head" or "Propfind" or
sometyhing to the other server to see if the file exists (and erroring if
the
overwrite = "F").  Then follow it up by a "Put".  The server could do a
"Delete" if the overwrite = "T", but this is not necessary, I think it
should simply do a "Merge" by doing the "Put".  If the user or Webdav client
wants to do a replace, have IT do the "Delete" to the other server, foobar,
itself.....

The only drawback is that replace now takes 2 Webdav calls instead of just
1.  Not too terrible, and the user (or Webdav client) is in charge of the
whole thing :)



Kevin
Received on Monday, 19 April 1999 13:14:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:43:49 GMT