Last active
May 7, 2020 05:59
-
-
Save mechazod/04519cb9f33b509fea17a10c7092fa91 to your computer and use it in GitHub Desktop.
Get React Native Available Disk Space
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ios | |
RNFetchBlob.fs.df().then( response => { | |
console.log('Free space in bytes: ' + response.free); | |
console.log('Total space in bytes: ' + response.total); | |
}); | |
// android | |
RNFetchBlob.fs.df().then( response => { | |
console.log('External free space in bytes: ' + response.external_free); | |
console.log('External total space in bytes: ' + response.external_total); | |
console.log('Internal free space in bytes: ' + response.internal_free); | |
console.log('Internal total space in bytes: ' + response.internal_total); | |
}); | |
Source: | |
https://stackoverflow.com/questions/41799211/checking-for-available-disk-space-in-react-native |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment