plugin_file_get
Read one file from a plugin’s files/ folder, for example to show an operator’s notes in an admin panel.
Request
Section titled “Request”{ "cmd": "plugin_file_get", "name": "hello", "path": "notes/today.md"}| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Plugin name. 1 to 64 letters, digits, _, or -. |
path |
string | Yes | File path relative to files/, 1 to 256 characters. It must stay inside the folder: a path that climbs out with .. is rejected. |
Response
Section titled “Response”{ "cmd": "plugin_file_get", "content": "Shipped the ping responder."}content is the file’s contents as text.
Permissions
Section titled “Permissions”Requires manage_server.
Errors
Section titled “Errors”val |
When |
|---|---|
Invalid plugin file path |
path is . or resolves to somewhere outside files/. |
Plugin file not found |
No file exists at that path, or the path is a folder. |
| Validation message | name or path is missing, blank, or too long. |
