@anymux/browser-fs
v0.1.0
Published
Browser-based file system using the File System Access API for AnyMux
Maintainers
Readme
@anymux/browser-fs
Browser-based file system implementation using the File System Access API.
Installation
pnpm add @anymux/browser-fsUsage
import { BrowserFileSystem } from "@anymux/browser-fs";
// Prompt user to pick a directory
const dirHandle = await window.showDirectoryPicker();
const fs = new BrowserFileSystem(dirHandle);
const files = await fs.readdir("/");
const content = await fs.readFile("/readme.txt", "utf-8");API Overview
Implements the full IFileSystem interface from @anymux/file-system, backed by the browser's native File System Access API.
- Read and write files in user-selected directories
- Create and remove directories
- List directory contents with
Direntsupport - File metadata via
stat()
Requirements
- A browser supporting the File System Access API (Chrome, Edge, Opera)
- User must grant directory access via
showDirectoryPicker()
License
MIT
