zheng 6c3f2333fd 修改 16 stundas atpakaļ
..
lib 6c3f2333fd 修改 16 stundas atpakaļ
LICENSE 6c3f2333fd 修改 16 stundas atpakaļ
README.md 6c3f2333fd 修改 16 stundas atpakaļ
package.json 6c3f2333fd 修改 16 stundas atpakaļ

README.md

@jsonjoy.com/fs-node-to-fsa

Adapter to convert Node.js fs API to File System Access API (FSA).

Installation

npm install @jsonjoy.com/fs-node-to-fsa

Usage

import { nodeToFsa } from '@jsonjoy.com/fs-node-to-fsa';
import * as fs from 'fs';

const dir = nodeToFsa(fs, '/path/to/directory', { mode: 'readwrite' });

// Now use the FSA API
for await (const [name, handle] of dir.entries()) {
  console.log(name, handle.kind);
}

Reference