Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 711 Bytes

README.md

File metadata and controls

40 lines (27 loc) · 711 Bytes

🚧 Under construction 👷‍♂️

File System for anywhere

📂 FileSystemFileHandle polyfill for Node.js and more!

Installation

Usage

// Node.js
import { openFile } from "@webfill/fs";

const handle = openFile("file.txt");
const file1 = await handle.getFile();
const text1 = await file1.text();
console.log(text1);
//=> 'I am a file!'

const writable = await handle.createWritable();
await writable.write("Hello world!");
await writable.close();

const file2 = await handle.getFile();
const text2 = await file2.text();
console.log(text2);
//=> 'Hello world!'
// Node.js and browser
import "@webfill/fs";