mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-25 05:19:53 +00:00
webapi.txt: s/dirnodes/directories/
This commit is contained in:
parent
9ad02dbe80
commit
6c38118c36
@ -108,7 +108,7 @@ the vdrive where currently nothing exists.
|
|||||||
'subdir': [ 'dirnode', { 'mutable': bool, 'uri': uri } ]
|
'subdir': [ 'dirnode', { 'mutable': bool, 'uri': uri } ]
|
||||||
|
|
||||||
note that the value is the same as the JSON representation of the
|
note that the value is the same as the JSON representation of the
|
||||||
corresponding FILEURL or DIRURL (except that dirnodes do not recurse --
|
corresponding FILEURL or DIRURL (except that directories do not recurse --
|
||||||
the "children" entry of the child is omitted).
|
the "children" entry of the child is omitted).
|
||||||
|
|
||||||
Before writing code that uses these results, please see the important note
|
Before writing code that uses these results, please see the important note
|
||||||
@ -148,7 +148,7 @@ the vdrive where currently nothing exists.
|
|||||||
directory then this deletes all of its chilren. Note that this *does not*
|
directory then this deletes all of its chilren. Note that this *does not*
|
||||||
delete any parent directories, so a sequence of 'PUT $NEWURL' and 'DELETE
|
delete any parent directories, so a sequence of 'PUT $NEWURL' and 'DELETE
|
||||||
$NEWURL' does not necessarily return the vdrive to its original state (it
|
$NEWURL' does not necessarily return the vdrive to its original state (it
|
||||||
may leave some intermediate directory nodes).
|
may leave some intermediate directories).
|
||||||
|
|
||||||
|
|
||||||
=== Manipulating files by name ===
|
=== Manipulating files by name ===
|
||||||
@ -160,10 +160,10 @@ file rather than a directory.
|
|||||||
PUT $NEWURL
|
PUT $NEWURL
|
||||||
|
|
||||||
This uploads a file to the given place in the vdrive. It will create
|
This uploads a file to the given place in the vdrive. It will create
|
||||||
intermediate directory nodes as necessary. The file's contents are taken
|
intermediate directories as necessary. The file's contents are taken from
|
||||||
from the body of the HTTP request. For convenience, the HTTP response
|
the body of the HTTP request. For convenience, the HTTP response contains
|
||||||
contains the URI that results from uploading the file, although the node
|
the URI that results from uploading the file, although the node is not
|
||||||
is not obligated to do anything with the URI. According to the HTTP/1.1
|
obligated to do anything with the URI. According to the HTTP/1.1
|
||||||
specification (rfc2616), this should return a 200 (OK) code when modifying
|
specification (rfc2616), this should return a 200 (OK) code when modifying
|
||||||
an existing file, and a 201 (Created) code when creating a new file.
|
an existing file, and a 201 (Created) code when creating a new file.
|
||||||
|
|
||||||
@ -208,9 +208,9 @@ than files.
|
|||||||
== URIs ==
|
== URIs ==
|
||||||
|
|
||||||
A separate top-level resource namespace ("uri/" instead of "vdrive/") is used
|
A separate top-level resource namespace ("uri/" instead of "vdrive/") is used
|
||||||
to get access to files and dirnodes that are indexed directly by URI, rather
|
to get access to files and directories that are indexed directly by URI,
|
||||||
than by going through the vdrive. The resource thus referenced is used the
|
rather than by going through the vdrive. The resource thus referenced is used
|
||||||
same way as if it were accessed through the vdrive (including accessing a
|
the same way as if it were accessed through the vdrive (including accessing a
|
||||||
directory's children with "$URI/childname").
|
directory's children with "$URI/childname").
|
||||||
|
|
||||||
For example, this identifies a file or directory:
|
For example, this identifies a file or directory:
|
||||||
@ -274,7 +274,7 @@ details.
|
|||||||
out-of-band channel, like IM or email).
|
out-of-band channel, like IM or email).
|
||||||
|
|
||||||
Note that this form merely redirects to the specific node indicated by the
|
Note that this form merely redirects to the specific node indicated by the
|
||||||
URI: unlike the GET /uri/$URI form, you cannot traverse to child nodes by
|
URI: unlike the GET /uri/$URI form, you cannot traverse to children by
|
||||||
appending additional path segments to the URL.
|
appending additional path segments to the URL.
|
||||||
|
|
||||||
The $URI provided as a query argument is allowed to contain slashes. The
|
The $URI provided as a query argument is allowed to contain slashes. The
|
||||||
@ -330,7 +330,7 @@ request reaches the server". Use URIs if you want "this particular object".
|
|||||||
name=childname (optional)
|
name=childname (optional)
|
||||||
file=newfile
|
file=newfile
|
||||||
|
|
||||||
This instructs the node to upload a file into the given dirnode. We need
|
This instructs the node to upload a file into the given directory. We need
|
||||||
this because forms are the only way for a web browser to upload a file
|
this because forms are the only way for a web browser to upload a file
|
||||||
(browsers do not know how to do PUT or DELETE). The file's contents and the
|
(browsers do not know how to do PUT or DELETE). The file's contents and the
|
||||||
new child name will be included in the form's arguments. This can only be
|
new child name will be included in the form's arguments. This can only be
|
||||||
@ -363,7 +363,7 @@ request reaches the server". Use URIs if you want "this particular object".
|
|||||||
t=delete
|
t=delete
|
||||||
name=childname
|
name=childname
|
||||||
|
|
||||||
This instructs the node to delete a file from the given dirnode. The name
|
This instructs the node to delete a file from the given directory. The name
|
||||||
of the child to be deleted will be included in the form's arguments.
|
of the child to be deleted will be included in the form's arguments.
|
||||||
|
|
||||||
POST $URL
|
POST $URL
|
||||||
@ -371,7 +371,7 @@ request reaches the server". Use URIs if you want "this particular object".
|
|||||||
from_name=oldchildname
|
from_name=oldchildname
|
||||||
to_name=newchildname
|
to_name=newchildname
|
||||||
|
|
||||||
This instructs the node to rename a child within the given dirnode. The
|
This instructs the node to rename a child within the given directory. The
|
||||||
child specified by 'from_name' is removed, and reattached as a child named
|
child specified by 'from_name' is removed, and reattached as a child named
|
||||||
for 'to_name'. An existing child at 'to_name' is replaced unless a
|
for 'to_name'. An existing child at 'to_name' is replaced unless a
|
||||||
"replace=false" argument is provided, making the default behavior similar
|
"replace=false" argument is provided, making the default behavior similar
|
||||||
@ -431,7 +431,7 @@ request reaches the server". Use URIs if you want "this particular object".
|
|||||||
will only be accepted from an HTTP connection originating from 127.0.0.1 .
|
will only be accepted from an HTTP connection originating from 127.0.0.1 .
|
||||||
|
|
||||||
The localfile= form expects that $LOCALPATH will point to a file on the
|
The localfile= form expects that $LOCALPATH will point to a file on the
|
||||||
node's local filesystem, and cause sthe node to upload that one file into
|
node's local filesystem, and causes the node to upload that one file into
|
||||||
the vdrive at the given location. Any parent directories will be created in
|
the vdrive at the given location. Any parent directories will be created in
|
||||||
the vdrive as necessary.
|
the vdrive as necessary.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user