Browse topics
Build an Applet Overview Quick Start Manifest Reference Method Architecture Entities & Storage Skills Agent Tools Permissions & Scopes CLI Testing
SDK Primitives Overview HTTP OAuth WebSocket Relay Database (SQLite) Key-Value Content Cache Project Filesystem Credentials Events Cron / Scheduler Feed Parsing
RobinPath Overview
On this page
Project Filesystem (projectFs)
Read and write files in the project folder root from an applet method.
ctx.sdk.projectFs reads and writes files relative to the project folder root, not applet-data. Use it for content that should live with the user’s project tree, such as rendered Markdown, cached HTML, or exported assets.
Scope required: fs:project / fs:project:write
Usage
await ctx.sdk.projectFs.writeFile(
`${ctx.resourceFolderPath}/cache/feed-${id}.html`,
rendered
);
const files = await ctx.sdk.projectFs.readDir("rightplace/docs");
ctx.resourceFolderPath is populated for runIn: "frontend" hooks, so you can anchor writes to the calling resource’s own folder.
Read vs write scope
fs:projectgrants read-only access (readFile,readDir, and similar).fs:project:writegrants read plus write (writeFile, and the rest). It implies read access, so you do not need to list both.
Manifest configuration
{
"scopes": [
"fs:project"
]
}
For write access:
{
"scopes": [
"fs:project:write"
]
}
Notes
- Paths are relative to the project folder root;
projectFsshares the same shape as the applet-data filesystem surface but rooted at the project tree. - Anchor resource-scoped writes to
ctx.resourceFolderPath, populated forrunIn: "frontend"hooks. - For structured data, prefer typed entities or projectDb over hand-rolled files.