files/volume/path
The files/volume/path gets a list of directory contents of the path, or deletes an empty directory.
URI path
files/volume/path
Where:
volume is either userfs or a USB flash drive name.
path refers to a directory in this system, and is constructed from a list of directory names separated by a /, indicating a specific location within the directory tree. Example directory paths include:
userfs/WEB userfs/WEB/python
If the path is omitted, the root directory of the volume is manipulated.
Supported request methods
GET
Queries the system for the directory listing associated with the specified path.
DELETE
Removes the specified directory path if it is empty.
Supported content types
HTML
For a GET, the result URIs are turned into URLs relative to the device, and returned in an HTML list, allowing browising of the directory structure.
XML
The GET form creates a directory listing record, with the top level node the same as the trailing directory name in the path. The full URI to each entry in the directory is included in the list. An example GET from /userfs/WEB/python might include:
<file_list> <file>files/userfs/WEB/python/name1</file> <file>files/userfs/WEB/python/name2</file> </file_list>
JSON
The GET form returns a list of URIs corresponding to the contents of the requested directory. The list is assigned to a field in a new object corresponding to the trailing directory name in the path. An example GET from /userfs/WEB/python might include:
{ “file_list” : [ “files/userfs/WEB/python/name1”, “files/userfs/WEB/python/name2” ] }