docs: update API documentation regarding file list notification
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
82fbee2bc0
commit
de1a79a7ca
|
@ -704,21 +704,43 @@ clients of the change:
|
||||||
`{jsonrpc: "2.0", method: "notify_filelist_changed",
|
`{jsonrpc: "2.0", method: "notify_filelist_changed",
|
||||||
params: [<file changed info>]}`
|
params: [<file changed info>]}`
|
||||||
|
|
||||||
The <file changed info> param is an object in the following format:
|
The <file changed info> param is an object in the following format, where
|
||||||
|
the "action" is the operation that prompted the change, and the "item"
|
||||||
|
contains information about the item that has changed:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{action: "<action>", filename: "<file_name>", root: "<root_name>"}
|
{action: "<action>",
|
||||||
|
item: {
|
||||||
|
path: "<file or directory path>",
|
||||||
|
root: "<root_name>",
|
||||||
|
size: <file size>,
|
||||||
|
modified: "<date modified>"
|
||||||
|
}
|
||||||
```
|
```
|
||||||
Note that file move/copy actions also include the name and root of the
|
Note that file move and copy actions also include a "source item" that
|
||||||
previous/source file:
|
contains the path and root of the source file or directory.
|
||||||
```json
|
```json
|
||||||
{action: "<action>", filename: "<file_name>", root: "<root_name>",
|
{action: "<action>",
|
||||||
prev_file: "<previous file name>", prev_root: "<previous_root_name>"}
|
item: {
|
||||||
|
path: "<file or directory path>",
|
||||||
|
root: "<root_name>",
|
||||||
|
size: <file size>,
|
||||||
|
modified: "<date modified>"
|
||||||
|
},
|
||||||
|
source_item: {
|
||||||
|
path: "<file or directory path>",
|
||||||
|
root: "<root_name>"
|
||||||
|
}
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The `action` is the operation that resulted in a file list change, the `filename`
|
The following `actions` are currently available:
|
||||||
is the name of the file the action was performed on, and the `filelist` is the current
|
- `upload_file`
|
||||||
file list, returned in the same format as `get_file_list`.
|
- `delete_file`
|
||||||
|
- `create_dir`
|
||||||
|
- `delete_dir`
|
||||||
|
- `move_item`
|
||||||
|
- `copy_item`
|
||||||
|
|
||||||
# Appendix
|
# Appendix
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue