Skip to content

plugin_file_list

List what’s in a plugin’s files/ folder. This folder holds notes and assets that an operator keeps next to the plugin. The plugin’s own code can’t read it.

{
"cmd": "plugin_file_list",
"name": "hello"
}
Field Type Required Description
name string Yes Plugin name. 1 to 64 letters, digits, _, or -.
{
"cmd": "plugin_file_list",
"files": [
{
"name": "notes.md",
"ext": ".md",
"path": "/srv/originchats/db/plugins/hello/files/notes.md",
"isDir": false
},
{
"name": "images",
"ext": "",
"path": "/srv/originchats/db/plugins/hello/files/images",
"isDir": true
}
]
}

Each entry describes one item directly inside files/:

Field Description
name File or folder name.
ext Extension including the dot, or "".
path Full path on the server.
isDir true for a folder.

Entries also carry a type field with low-level file-mode information.

The list isn’t recursive: a subfolder appears as one entry with isDir: true. If the plugin has no files/ folder, or isn’t installed, files is empty.

Requires manage_server.

val When
Invalid plugin name name has characters other than letters, digits, _, and -.
Validation message name is missing, blank, or longer than 64 characters.