Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

Add support for SDCard applications's directory (Android only) #372

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions android/src/main/java/com/RNFetchBlob/RNFetchBlobFS.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ static public Map<String, Object> 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;
Expand Down
1 change: 1 addition & 0 deletions fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const dirs = {
DownloadDir : RNFetchBlob.DownloadDir,
DCIMDir : RNFetchBlob.DCIMDir,
SDCardDir : RNFetchBlob.SDCardDir,
SDCardApplicationDir : RNFetchBlob.SDCardApplicationDir,
MainBundleDir : RNFetchBlob.MainBundleDir,
LibraryDir : RNFetchBlob.LibraryDir
}
Expand Down