Skip to content

Vibe coding a plugin? 😎 Teach your agent Modlumi first. Works with Claude Code, Codex, Cursor and more.

PluginDataFiles

Files in the plugin’s private data folder, which needs the "files.pluginData" permission. Names are paths inside the folder, such as "cache/parts.json". The folder holds at most 1 GiB in 10,000 files and folders; a write that would go over throws a RangeError.

list(): readonly string[]

The names of all the files, sorted.

readonly string[]


readBytes(name): Uint8Array<ArrayBufferLike> | null

string

Uint8Array<ArrayBufferLike> | null


readText(name): string | null

Returns the file’s text, or null when there is no such file.

string

string | null


remove(name): boolean

Removes a file; returns whether there was one.

string

boolean


writeBytes(name, bytes): void

string

ArrayBuffer | Uint8Array<ArrayBufferLike>

void


writeText(name, text): void

Creates or replaces a file, and the folders it is in.

string

string

void