From: Zooko O'Whielacronx Date: Fri, 10 Aug 2007 19:52:37 +0000 (-0700) Subject: webapi.txt: put back the localfile feature X-Git-Url: https://git.rkrishnan.org/listings/index.php?a=commitdiff_plain;h=ba2e9aa4cb6fa58b23d951a3208b8beaad0cadb3;p=tahoe-lafs%2Ftahoe-lafs.git webapi.txt: put back the localfile feature So that we can compare versions webapi.txt with and without this documentation side by side. --- diff --git a/docs/webapi.txt b/docs/webapi.txt index e5498d74..729f62a0 100644 --- a/docs/webapi.txt +++ b/docs/webapi.txt @@ -122,6 +122,14 @@ nothing exists. (Currently all files are immutable so everyone has read-only access to all files.) + GET $URL?t=download&localfile=$LOCALPATH + + This instructs the node to download the given file or directory and write + it into the local filesystem at $LOCALPATH. This request will only be + accepted from an HTTP client connection originating at 127.0.0.1 . This + request is most useful when the client node and the HTTP client are + operated by the same user. $LOCALPATH should be an absolute pathname. + PUT $URL?t=uri This attaches a child (either a file or a directory) to the vdrive at the @@ -130,6 +138,26 @@ nothing exists. vdrive. Intermediate directories are created on-demand just like with the regular PUT command. + PUT $NEWURL?t=upload&localfile=$LOCALPATH + + This uploads a file or directory from the node's local filesystem to the + vdrive. As with "GET $URL?t=download&localfile=$LOCALPATH", this request + will only be accepted from an HTTP connection originating from 127.0.0.1. + + If $LOCALPATH points to a directory on the node's local filesystem, then + the node performs a recursive upload of the directory into the vdrive at + the given location. $NEWURL will be created if necessary. When the + operation is complete, the directory referenced by $NEWURL will contain all + of the files and directories that were present in $LOCALPATH, so this is + equivalent to the unix commands: + + mkdir -p $NEWURL; cp -r $LOCALPATH/* $NEWURL/ + + Note that the "curl" utility can be used to provoke this sort of recursive + upload, since the -T option will make it use an HTTP 'PUT': + + curl -T /dev/null 'http://localhost:8011/vdrive/global/newdir?t=upload&localdir=/home/user/directory-to-upload' + DELETE $URL This deletes the given file or directory from the vdrive. If it is a