Check free storage space with RNFetchBlob (VS. RNFS)?

I am currently working on a React-Native project using React-Native-FS ( RNFS ). It looks like the project is not actively supported and the RNFS devs recommend using React-Native-Fetch-Blob ( RNFetchBlob ). The latter seems to be satisfying (although FileSystem offers fewer features than RNFS) and loading ( fetch

) is easier.

However, I used RNFS getFSInfo()

to extract the amount of free disk space. RNFetchBlob recently released a function df()

that basically does the same thing. However, I don't have the same results:

// RNFS
{
  totalSpace: 248828264448 (~ 248 GBytes)
  freeSpace: 216244088832 (~ 216 GBytes)
}

// RNFetchBlob
{
  free: 1495726032 (~ 1.5 GBytes)
  total: -279838720 (~ -279 MBytes)
}

      

What explains the difference between the two? Why is the last RNFetchBlob negative? There is no documentation regarding this RNFetchBlob.fs.df()

, and looking at the source did not help me determine the difference.

PS : I am using xcode emulator; the reason is that RNFS checks for the laptop and RNFetchBlob checks for the emulator ?

+3
javascript ios react-native react-native-fetch-blob


source to share


No one has answered this question yet

Check out similar questions:

7432
How to check if a string contains a substring in JavaScript?
7428
How can I check if an element is hidden in jQuery?
3952
Setting "checked" for a checkbox with jQuery?
3714
How to check if an array contains a value in JavaScript?
2685
Checking if a key exists in a JavaScript object?
2597
How can I check for empty string / undefined / null in JavaScript?
2543
How can I check if an object is an array?
2131
How do I check for "undefined" in JavaScript?
2038
Is there a standard function for testing null, undefined, or empty variables in JavaScript?
1513
Check if a variable is a string in JavaScript.



All Articles
Loading...
X
Show
Funny
Dev
Pics