Skip to content

plugin_file_get

Read one file from a plugin’s files/ folder, for example to show an operator’s notes in an admin panel.

{
"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.
{
"cmd": "plugin_file_get",
"content": "Shipped the ping responder."
}

content is the file’s contents as text.

Requires manage_server.

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.