list
To see the storage folder structure, use the file/list command:
svc=file/list¶ms={"itemId":<long>,
"storageType":<uint>,
"path":<text>,
"mask":<text>,
"recursive":<bool>,
"fullPath":<bool>}
Parameters
Parameter | Description |
---|---|
itemId | Item ID. |
storageType | Storage type: |
path | Relative path from the root folder to the file. |
mask | File name mask. It can contain the asterisk (*) which replaces 0 or more characters, and the question mark (?) which replaces 1 character. If you specify several masks, separate them by commas. |
recursive | Use this flag to specify whether you want the content to be displayed recursively with subdirectories. |
fullPath | Use this flag to specify whether you want to see the full path of the items. |
Only the item creator can place and delete files.
Response
If the request is completed successfully, the storage structure is returned. The signature n/c means that the hierarchy item is a folder, the signature n/s means this is a file.
[
{
"n": <text>, /* path to the selected folder, starts with "public" or "protected" */
"c": [ /* root folder content, it can include files and/or folders */
{
"n": <text> /* folder name */
"c": [...] /* folder content, it can include files and/or folders */
},
{
"n": <text>, /* file name */
"s": <text> /* file size (bytes) */
},
...
]
}
]
If the request hasn’t been completed, an error code is returned.
Error codes
Code | Description |
---|---|
1 | User not authorized. |
4 | Invalid input parameters. |
5 | Failed to get the list of files at the specified path. |
7 | Insufficient rights to the item specified in the itemId parameter. |