diff --git a/android/src/main/java/com/RNFetchBlob/RNFetchBlobFS.java b/android/src/main/java/com/RNFetchBlob/RNFetchBlobFS.java index e845086db..707185713 100644 --- a/android/src/main/java/com/RNFetchBlob/RNFetchBlobFS.java +++ b/android/src/main/java/com/RNFetchBlob/RNFetchBlobFS.java @@ -207,6 +207,7 @@ static public Map getSystemfolders(ReactApplicationContext ctx) state = Environment.getExternalStorageState(); if (state.equals(Environment.MEDIA_MOUNTED)) { res.put("SDCardDir", Environment.getExternalStorageDirectory().getAbsolutePath()); + res.put("SDCardApplicationDir", ctx.getExternalFilesDir(null).getParentFile().getAbsolutePath()); } res.put("MainBundleDir", ctx.getApplicationInfo().dataDir); return res; diff --git a/fs.js b/fs.js index 295aa8eb5..349ddab26 100644 --- a/fs.js +++ b/fs.js @@ -29,6 +29,7 @@ const dirs = { DownloadDir : RNFetchBlob.DownloadDir, DCIMDir : RNFetchBlob.DCIMDir, SDCardDir : RNFetchBlob.SDCardDir, + SDCardApplicationDir : RNFetchBlob.SDCardApplicationDir, MainBundleDir : RNFetchBlob.MainBundleDir, LibraryDir : RNFetchBlob.LibraryDir }