npm.io
4.8.1 • Published 3 weeks ago

bare-fs

Licence
Apache-2.0
Version
4.8.1
Deps
5
Size
1.3 MB
Vulns
0
Weekly
0
Stars
27

bare-fs

Native file system operations for Bare. The API closely follows that of the Node.js fs module.

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)
}

API

See the bare-fs reference.

License

Apache-2.0