Add all files and directories from the passed stream. This method wraps the
importer export from the ipfs-unixfs-importer module - please see the docs
for input/output types.
Optionaloptions: Omit<AddOptions, "mode" | "mtime">Add a single Uint8Array to your Helia node and receive a CID that will
resolve to it.
If you want to preserve a file name or other metadata such as modification
time or mode, use addFile instead.
Optionaloptions: AddFileOptionsAdd a stream of Uint8Arrays to your Helia node and receive a CID that
will resolve to them.
If you want to preserve a file name or other metadata such as modification
time or mode, use addFile instead.
Optionaloptions: AddFileOptionsAdd a directory to your Helia node.
Optionaldir: Partial<DirectoryCandidate>Optionaloptions: AddFileOptionsIf no path is specified, the returned CID will resolve to an empty directory.
const cid = await fs.addDirectory()
console.info(cid) // empty directory CID
If a path is specified, the CID will resolve to a directory that contains an empty directory with the specified name.
const cid = await fs.addDirectory({
path: 'my-dir'
})
console.info(cid) // containing directory CID
const stat = await fs.stat(cid, {
path: 'my-dir'
})
console.info(stat.cid) // empty directory CID
Add a file to your Helia node with metadata. The returned CID will resolve to a directory with one file entry.
If you don't care about file names and just want a CID that will resolve to
the contents of the file, use addBytes or addByeStream instead.
Optionaloptions: AddFileOptionsRetrieve the contents of a file from your Helia node.
Optionaloptions: CatOptionsChange the permissions on a file or directory in a DAG
Optionaloptions: ChmodOptionsList directory contents.
Make a new directory under an existing directory.
Optionaloptions: MkdirOptionsReturn statistics about a UnixFS DAG.
Optionaloptions: StatOptionsOptionaloptions: ExtendedStatOptionsUpdate the mtime of a UnixFS DAG
Optionaloptions: TouchOptions
The UnixFS interface provides familiar filesystem operations to make working with UnixFS DAGs simple and intuitive.