src/backend/doc/modules/filesystem/API_SPEC.md
Filesystem endpoints allow operations on files and directories in the Puter filesystem.
/mkdir (auth required)Creates a new directory in the filesystem. Currently support 2 formats:
{"path": "/foo/bar", args ...} — this API is used by apitest (./tools/api-tester/apitest.js) and aligns more closely with the POSIX spec (https://linux.die.net/man/3/mkdir){"parent": "/foo", "path": "bar", args ...} — this API is used by puter-js via puter.fs.mkdirA future work would be use a unified format for all filesystem operations.
path - required
stringparent - optional
string | UUIDoverwrite - optional
booleanfalsededupe_name - optional
booleanfalsecreate_missing_parents - optional
booleanfalsecreate_missing_ancestorsshortcut_to - optional
string | UUID{
"path": "/user/Desktop/new-directory"
}
{
"parent": "/user",
"path": "Desktop/new-directory"
}
Returns the created directory's metadata including name, path, uid, and any parent directories created.
[Additional endpoints would be documented here...]