# random-access-rn-file

> A random-access-* compatible implementation for React-Native that uses it's filesystem

Latest version **1.0.1** (published 2019-02-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install random-access-rn-file
pnpm add random-access-rn-file
yarn add random-access-rn-file
bun add random-access-rn-file
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-02-28 |
| First published | 2019-02-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | rangermauve |
| Maintainers | lachenmayer, rangermauve |
| Keywords | random, access, storage, react, native, rn, file |

## Links

- npm: https://www.npmjs.com/package/random-access-rn-file
- Repository: https://github.com/RangerMauve/random-access-rn-file
- Homepage: https://github.com/RangerMauve/random-access-rn-file#readme
- Issues: https://github.com/RangerMauve/random-access-rn-file/issues
- npm.io page: https://npm.io/package/random-access-rn-file

## Dependencies (3)

- [path](https://npm.io/package/path.md) ^0.12.7
- [react-native-fs](https://npm.io/package/react-native-fs.md) ^2.13.3
- [random-access-storage](https://npm.io/package/random-access-storage.md) ^1.3.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-02-28
- 1.0.0 — 2019-02-27

## README

# random-access-rn-file
A random-access-* compatible implementation for React-Native that uses it's filesystem

```
npm install --save random-access-rn-file

# If you're building an application
# Link the FS APIs
react-native link react-native-fs

# Make node modules work (Make sure to import shim.js)
npm install --save-dev rn-nodeify
rn-nodeify --install --hack
```

Uses [random-access-storage](https://github.com/random-access-storage/random-access-storage) along with [react-native-fs](https://github.com/itinance/react-native-fs/) to provide the ability to read and write files.

After installing, make sure to run `react-native link react-native-fs` to set up the native dependencies

Supported operations:

- `read`
- `write`

## Example

```javascript
import hyperdrive from 'hyperdrive'
import storage from 'random-access-rn-file'

const archive = hyperdrive(storage)

archive.writeFile('/example.txt', 'Hello World', 'utf8')
```

If you're having trouble getting node APIs to work in React-Native, check out [rn-nodeify](https://github.com/tradle/rn-nodeify) to see if it helps, or [open an issue](https://github.com/RangerMauve/random-access-rn-file/issues/new).

---
_Source: https://npm.io/package/random-access-rn-file · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
