React-Native Turbo-module for fast FS operations with native ArrayBuffer support
~20x faster for Append and ~49x faster for Read than react-native-fs on a Nexus 5X, because it avoids having to Base64 / Unbase64 the data back and forth.
Try the benchmarks under example.
iPhone | Android |
---|---|
![]() |
![]() |
npm install -S @seald-io/react-native-turbo-fs
import { read, append } from '@seald-io/react-native-turbo-fs'
const buffer = read('my-file-path', 512*1024, 0);
append('my-other-file', buffer);
Reads a chunk of size size
from the file at filePath
, starting from position position
.
Returns an ArrayBuffer of the data read.
If the file is not long enough, it returns an ArrayBuffer of length of what was actually read.
If there is nothing to read at that position, it returns an ArrayBuffer of length 0.
Appends the given data to the end of the file at filePath
.
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT by Seald SAS, based on the template of react-native-quick-base64 by Takuya Matsuyama