site-panzai/node_modules/bare-fs/README.md

34 lines
500 B
Markdown
Raw Normal View History

2026-11-13 13:57:04 +01:00
# bare-fs
Native file system operations for Bare. The API closely follows that of the Node.js `fs` module.
```
npm i bare-fs
```
## Usage
```js
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](https://docs.pears.com/reference/bare/modules/bare-fs).
## License
Apache-2.0