readDir called with null on Android yields `NullPointerException`
java.lang.NullPointerException: Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference
at java.io.File.fixSlashes(File.java:183)
at java.io.File.<init>(File.java:130)
at com.rnfs.RNFSManager.readDir(RNFSManager.java:123)
at java.lang.reflect.Method.invoke(Native Method)
@cancan101 what's the result on iOS? What is your expected result here?
I get the similar result on android with the example code (it works with PicturesDirectoryPath)
RNFS.readDir(RNFS.MainBundlePath) .then((result) => { console.log('GOT RESULT', result); // stat the first file }).catch((err) => { console.log(err.message, err.code); }); } error: Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference
@tristola android not have MainBundlePath (see this), if you need to read assets, you can wait #83.
Created a pull request to have working example - PicturesDirectoryPath should exist in both platforms? #96