Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

bare-fs

holepunchto38.5mApache-2.04.5.0TypeScript support: included

Native file system operations for Javascript

readme

bare-fs

Native file system operations for Javascript.

npm i bare-fs

Usage

const fs = require('bare-fs')

const fd = await fs.open('hello.txt')

const buffer = Buffer.alloc(1024)

try {
  const length = await fs.read(fd, buffer)

  console.log('Read', length, 'bytes')
} finally {
  await fs.close(fd)
}

License

Apache-2.0