[tahoe-lafs-trac-stream] [tahoe-lafs] #1732: consider changes to webapi "Move" API before release
tahoe-lafs
trac at tahoe-lafs.org
Thu Mar 14 17:51:03 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 davidsarah):
Improvements to clarify that metadata is preserved and the crash/failure
behaviour.
{{{
Moving A Child
--------------
``POST
/uri/$DIRCAP/[SUBDIRS../]?t=move&from_name=OLD&to=$NEWDIRCAP/[NEWSUBDIRS../]NEW``
This instructs the node to move a child of the given directory to a
different directory, both of which must be writeable. Metadata from the
directory entry is preserved. The to= parameter should contain a path
to the destination directory (multiple levels of descent are supported)
ending with the new name. The new name must be included even if it is the
same as the old name.
The default behavior is to overwrite any existing object at the given
location. To prevent this (and make the operation return an error instead
of overwriting), add a "replace=false" argument. With replace=false, this
operation will return an HTTP 409 "Conflict" error if there is already an
object at the given location, rather than overwriting the existing
object.
To allow the operation to overwrite a file, but return an error when
trying
to overwrite a directory, use "replace=only-files" (this behavior is
closer
to the traditional UNIX "mv" command). Note that "true", "t", and "1" are
all synonyms for "True", and "false", "f", and "0" are synonyms for
"False",
and the parameter is case-insensitive.
For safety, the child is not unlinked from the old directory until it has
been successfully added to the new directory. This implies that in case
of
a crash or failure, the child will not be lost, but could be linked at
both
the old and new locations.
}}}
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1732#comment:24>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list