joltup / rn-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.84k stars 787 forks source link

File system method df reports incorrect disk size [Android] #380

Open CapitanRedBeard opened 5 years ago

CapitanRedBeard commented 5 years ago
react-native@0.57.8
rn-fetch-blob@0.10.15
Platform: Android
Device: Samsung S8

Hi! Found an inconsistency when implementing RNFetchBlob.fs.df() in terms of the number reported.

When logging out results for RNFetchBlob.fs.df() on a local Android device I'm getting the following values:

external_free: "51772129280"   // 51.77 GB
external_total: "57939394560"  // 57.93 GB
internal_free: "51887472640"   // 51.88 GB
internal_total: "57960366080"  // 57.76 GB

However if I look into the storage space on my local android device (Samsung S8) I see the following values:

Total space: 64GB
Available space: 48.2 GB
System memory: 10 GB

There doesn't seem to be any correlation between what the phone is reporting as free space and what this API is reporting so I'm curious as to why the mismatch.

jon-moreira commented 5 years ago

I have the same problem.

After call the function RNFetchBlob.fs.df() with or without SDCard the result are the same!

external_free: "7011020800"   //7.01 GB
external_total: "11329761280"  // 11.32 GB
internal_free: "7037235200"   // 7.03 GB
internal_total: "11350732800"  // 11.35 GB
ithustle commented 4 years ago

+1

thuongtv-vn commented 4 years ago

Hi All, Is there any update? I got the same issue.