[tahoe-lafs-trac-stream] [tahoe-lafs] #1732: consider changes to webapi "Move" API before release

tahoe-lafs trac at tahoe-lafs.org
Thu Mar 21 19:00:13 UTC 2013


#1732: consider changes to webapi "Move" API before release
-------------------------------+-------------------------------------------
     Reporter:  warner         |      Owner:  warner
         Type:  enhancement    |     Status:  new
     Priority:  critical       |  Milestone:  1.10.0
    Component:  code-          |    Version:  1.9.1
  frontend-web                 |   Keywords:  forward-compatibility blocker
   Resolution:                 |
Launchpad Bug:                 |
-------------------------------+-------------------------------------------

Comment (by ClashTheBunny):

 Zooko and I talked about this during the dev talk and I wanted to share my
 two points.

 I first felt that not having the full rooted cap to the file to be moved
 was punting in that it was hard to implement the other way, so we would do
 it this way.  Zooko helped me understand that the real operation happens
 at the directory, in that the directory is a file allocation table that is
 being edited.  He told me about the history with the command line 'rm'
 being confusing in that it doesn't remove a file, but just removes the
 entry in the directory's file allocation table.  Because of this, I'm good
 with the new verbage of doing a move operation on the containing
 directory.  It's also a win for people who want to just replace "rename"
 with the new API and things will just work.

 The second thing we talked about is that his new API should really be
 called "relink" in that it's not operating on (moving) a file, but it's
 creating a link for a file in a new place, and then deleting the old link
 (or editing the link in the current directory).  That brings me to my
 proposal for a slight alteration to [comment:30 comment 30's definition of
 the new API]:

 {{{
 POST
 /uri/$DIRCAP/[SUBDIRS../]?t=relink&from_name=OLD&to_dir=$NEWDIRCAP/[NEWSUBDIRS../]&to_name=NEW[&replace=true|false
 |only-files]
 }}}

 This way people understand that the operation doesn't change a file in any
 way, but it actually edits links to the file.  It operates on the
 directory, and not the file too, which is reflected in this.  It also
 leave rename the same, but allows for people who want to update to the new
 API from 'rename' to just replace 'rename' with 'relink'.

-- 
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1732#comment:36>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list