Library for random file access.

Hi there,

I have several large binary files (±500MB each) that I want to read data from within my app. Because the files are large, and I may need data from multiple files at the same time. I need a way to read only certain parts of the file i.e through a start position and a read length without having to load the entire file into memory.

I liked the react-native-fs library since that provided pretty much the exact functionality I needed. But I see that it doesn’t seem to be supported by Expo Go, and whenever I try to run the app using the library I receive the following error:

TypeError: null is not an object (evaluating ‘RNFSManager.RNFSFileTypeRegular’)

Does anyone know if there exists a library that is both supported by Expo Go and allows random access to files? Or, failing that, perhaps how to get react-native-fs to work within Expo Go?

Thanks

Hi @walter.sharp

react-native-fs will not work in Expo Go because Expo Go does not include the native parts of the library.

However, you can create a development build of your app to use instead, which is basically a custom version of Expo Go, but with your dependencies built in.