Skip to content

Mounted IndexedDB file system doesn't support writeFileSync #315

@soapdog

Description

@soapdog

I have a filesystem initialized with

BrowserFS.configure({
    fs: "MountableFileSystem",
    options: {
        "/templates": {
            fs: "ZipFS",
            options: {
                // Wrap as Buffer object.
                zipData: Buffer.from(zipData)
            }
        },
        "/tmp": { fs: "InMemory" },
        "/books": { fs: "IndexedDB", options: { storeName: "books" } },
        "/etc": { fs: "IndexedDB", options: { storeName: "etc"} },
        "/integration": { fs: "IndexedDB", options: { storeName: "integration" } }

    }
}

I can read and write normally to /tmp and read from /templates but attempts to write using either writeFileSync or writeFile to any of the IndexedDB paths fail with error:

errno: 95, code: "ENOTSUP"

I'm building with rollup, and I didn't expected this to fail. Trying to use "LocalStorage" as a backend works but since I'm writing large files, I'd rather use IndexedDB.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions