Преглед на файлове

Merge pull request #92 from timsuchanek/0.10.0

Added SDCard for Android
wkh237 преди 8 години
родител
ревизия
8c338698c2
променени са 2 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 1
    0
      src/android/src/main/java/com/RNFetchBlob/RNFetchBlobFS.java
  2. 2
    1
      src/fs.js

+ 1
- 0
src/android/src/main/java/com/RNFetchBlob/RNFetchBlobFS.java Целия файл

@@ -207,6 +207,7 @@ public class RNFetchBlobFS {
207 207
         res.put("DownloadDir", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath());
208 208
         res.put("MovieDir", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES).getAbsolutePath());
209 209
         res.put("RingtoneDir", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_RINGTONES).getAbsolutePath());
210
+        res.put("SDCard", Environment.getExternalStorageDirectory().getAbsolutePath());
210 211
         return res;
211 212
     }
212 213
 

+ 2
- 1
src/fs.js Целия файл

@@ -28,7 +28,8 @@ const dirs = {
28 28
     MusicDir : RNFetchBlob.MusicDir,
29 29
     MovieDir : RNFetchBlob.MovieDir,
30 30
     DownloadDir : RNFetchBlob.DownloadDir,
31
-    DCIMDir : RNFetchBlob.DCIMDir
31
+    DCIMDir : RNFetchBlob.DCIMDir,
32
+    SDCardDir : RNFetchBlob.SDCardDir
32 33
 }
33 34
 
34 35
 /**