@anymux/indexeddb
v0.1.0
Published
IndexedDB file system adapter for AnyMux (browser)
Downloads
47
Maintainers
Readme
@anymux/indexeddb
IndexedDB-backed file system for AnyMux. Persistent browser storage with full IFileSystem support.
Installation
pnpm add @anymux/indexeddbUsage
import { IndexedDbFileSystem } from "@anymux/indexeddb";
const fs = new IndexedDbFileSystem({ dbName: "my-app-fs" });
await fs.initialize();
await fs.mkdir("/documents", { recursive: true });
await fs.writeFile("/documents/note.txt", "Hello!");
// Data persists across page reloads
const content = await fs.readFile("/documents/note.txt", "utf-8");API Overview
Implements the full IFileSystem interface from @anymux/file-system, storing files and directories in IndexedDB.
- Persistent storage that survives page reloads
- No file size prompts or permissions dialogs
- Works in all modern browsers
- Supports directories, metadata, and binary data
Configuration
dbName— IndexedDB database name (default:"anymux")storeName— Object store name (default:"files")
License
MIT
