npm install opendal
- see index.d.ts
import { Operator, Scheme } from 'opendal'
async function main() {
const op = new Operator(Scheme.Fs, { root: '/tmp' });
await op.write("test", "Hello, World!");
const bs = await op.read("test");
console.log(new TextDecoder().decode(bs));
const meta = await op.stat("test");
console.log(`contentLength: ${meta.contentLength}`);
}
main()
- Install latest
Rust
- Install
Node.js@10+
which fully supportedNode-API
We are using corepack
to specific package manager:
corepack enable
corepack
is distributed with Node.js, so you do not need to specifically look for a way to install it.
yarn
yarn build
yarn test