Portal Community
What MFS is: the Mutable File System is a virtual, UNIX-like filesystem layered on top of IPFS's immutable content-addressed objects — it lets a workflow build up a directory tree with normal paths (/reports/2026/q1.csv) while IPFS handles the underlying CIDs.

copy

FieldTypeRequiredDefault
mfsSourcePathtext✓ YesMFS path or /ipfs/<cid>[/path]
mfsDestPathtext✓ YesAbsolute destination MFS path
parentsboolNofalse — create intermediate destination directories
forceboolNofalse — overwrite existing destination

Missing paths → CFG_MISSING_SOURCE_PATH / CFG_MISSING_DEST_PATH. Response: { mfsSourcePath, mfsDestPath } (Kubo returns no CID for this call).

flush

FieldTypeRequiredDefault
mfsPathtextNo/ — root flushes the entire tree

Response: { mfsPath, cid }.

list

FieldTypeRequiredDefault
mfsPathtextNo/
unsortedboolNofalse — skip Kubo's alphabetical sort

Response: array of { name, cid, size, type }, plus count.

makeDirectory

FieldTypeRequiredDefault
mfsPathtext✓ Yes
parentsboolNotrue — this node's default diverges from Kubo's own default of false
cidVersionintNo0
hashFunctiontextNosha2-256

Missing path → CFG_MISSING_PATH. Response: { mfsPath } — Kubo doesn't return a CID for a directory creation; call files/stat or files/flush afterward if you need it.

move

FieldTypeRequired
mfsSourcePathtext✓ Yes
mfsDestPathtext✓ Yes

MFS-only (no /ipfs/<cid> source support, unlike copy). The destination's parent directory must already exist — no parents option. Missing paths → CFG_MISSING_SOURCE_PATH / CFG_MISSING_DEST_PATH. Response: { mfsSourcePath, mfsDestPath }.

read

Binary output.

FieldTypeRequiredDefault
mfsPathtext✓ Yes
offsetint (long)No0
countint (long)No— (reads to EOF)

Missing path → CFG_MISSING_PATH. Response: { mfsPath, size, data }data is the raw byte[].

remove

FieldTypeRequiredDefault
mfsPathtext✓ Yes
recursiveboolNofalse — required for non-empty directories
forceboolNofalse — treat "not found" as a no-op success

Missing path → CFG_MISSING_PATH. Response: { mfsPath }.

MFS root is protected: removing path / is refused before any network call, independent of the Validate() check — the executor's error message is "Refusing to remove the MFS root path "/"."

stat

FieldTypeRequiredDefault
mfsPathtext✓ Yes
withLocalboolNofalse — more expensive; computes local pinning/size stats

Missing path → CFG_MISSING_PATH. Response: { mfsPath, cid, size, cumulativeSize, blocks, type, withLocality }.

write

Binary input.

FieldTypeRequiredDefault
mfsPathtext✓ Yes
inputDataKeytextNodata
dataModeselectNobase64 (or text)
inlineContenttextNo— fallback content
offsetint (long)No0
createboolNotrue — diverges from Kubo's own default of false
truncateboolNotrue — "replace whole file" semantics by default
parentsboolNotrue — consistent with makeDirectory's divergence
countint (long)No— (writes all input bytes)
rawLeavesboolNofalse
cidVersionintNo0
hashFunctiontextNosha2-256

Missing path → CFG_MISSING_PATH. Bytes resolved from InputData[inputDataKey] first, else inlineContent decoded per dataMode; empty → MISSING_FILE_DATA, bad base64 → INVALID_FILE_DATA_ENCODING. Response: { mfsPath, bytesWritten } — Kubo returns no CID for this call; bytesWritten is computed client-side from the input length.

Sensible defaults for building files incrementally: write and makeDirectory both default parents to true, and write defaults create/truncate to true — so a straightforward "write this file, creating any missing directories" call needs no extra flags.