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

Commit

Permalink
Add support for SDCards applications's directory (Android only) (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
blankg authored and wkh237 committed May 26, 2017
1 parent 6473764 commit e2dae6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
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

0 comments on commit e2dae6e

Please sign in to comment.