helia
    Preparing search index...

    Module @helia/mfs

    @helia/mfs is an implementation of a Mutable File System powered by Helia.

    See the API docs for all available operations.

    import { createHelia } from 'helia'
    import { mfs } from '@helia/mfs'

    const helia = await createHelia()
    const fs = mfs(helia)

    // create an empty directory
    await fs.mkdir('/my-directory')

    // add a file to the directory
    await fs.writeBytes(Uint8Array.from([0, 1, 2, 3]), '/my-directory/foo.txt')

    // read the file
    for await (const buf of fs.cat('/my-directory/foo.txt')) {
    console.info(buf)
    }

    Interfaces

    MFS
    MFSComponents
    MFSInit
    RmOptions

    Type Aliases

    MkdirOptions
    WriteOptions

    Functions

    mfs