[tahoe-lafs-trac-stream] [tahoe-lafs] #1732: consider changes to webapi "Move" API before release
tahoe-lafs
trac at tahoe-lafs.org
Mon Mar 18 14:31:42 UTC 2013
#1732: consider changes to webapi "Move" API before release
-------------------------------+-------------------------------------------
Reporter: warner | Owner: warner
Type: enhancement | Status: new
Priority: major | Milestone: 1.10.0
Component: code- | Version: 1.9.1
frontend-web | Keywords: forward-compatibility blocker
Resolution: |
Launchpad Bug: |
-------------------------------+-------------------------------------------
Comment (by zooko):
We agreed in the dev chat of 2013-03-14 that this API won't support an
implicit final name, so you can't say {{{POST
/uri/$OLDDIRCAP/$OLDNAME/?t=move&from_name=$OLD&to=$NEWDIRCAP/$NEWNAME/}}}
to mean that the new name should be {{{$NEWDIRCAP/$NEWNAME/$OLD}}}. This
is something that unix {{{mv}}} supports ("{{{mv foo/bar baz/}}}"), and
tahoe mv might or might not support it, but this API won't. The reason not
to is that if it did, then it becomes harder to disambiguate if the user
means to add to the directory {{{$NEWDIRCAP/$NEWNAME}}} a link under the
name {{{$OLD}}}, or to add to the directory {{{$NEWDIRCAP}}} a link under
the name {{{$NEWNAME}}}.
Now I'm confused about why we spell it {{{$CAP/$NAME/&arg=$FINALNAME}}} in
the source but {{{$CAP/$NAME/$FINALNAME}}} in the destination? It's not
consistent. In the interests of consistency, how about one of these two
APIs:
{{{
POST
/uri/$DIRCAP/[SUBDIRS../]OLD?t=move&to=$NEWDIRCAP/[NEWSUBDIRS../]NEW[&replace=true|false
|only-files]
}}}
or
{{{
POST
/uri/$DIRCAP/[SUBDIRS../]?t=move&from_name=OLD&to=$NEWDIRCAP/[NEWSUBDIRS../]&to_name=NEW[&replace=true|false
|only-files]
}}}
Between these two, the first one has the advantage of being less wordy.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1732#comment:27>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list