Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

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 along with 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

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 to see if it helps, or open an issue.

About

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

Resources

License

Releases

No releases published

Packages

No packages published