108
Views
8
Comments
Solved
Mobile disk size
Question

Any way to return the disk size available and consumed from the device?

2024-05-22 10-21-41
Mohammad Hasib
Solution

Filipe Lourenço wrote:

Any way to return the disk size available and consumed from the device?

Dear Filipe,


One cordova plugin is available to check the disk size. you can wrap it in outsystems and get the result.

cordova plugin add org.apache.cordova.file

Please go through with the link:

https://www.thepolyglotdeveloper.com/2015/02/get-available-free-disk-space-using-apache-cordova/


Regards,



2024-01-05 16-00-17
Filipe Lourenço

mohammad hasib wrote:

Filipe Lourenço wrote:

Any way to return the disk size available and consumed from the device?

Dear Filipe,


One cordova plugin is available to check the disk size. you can wrap it in outsystems and get the result.

cordova plugin add org.apache.cordova.file

Please go through with the link:

https://www.thepolyglotdeveloper.com/2015/02/get-available-free-disk-space-using-apache-cordova/


Regards,




Yes it does but do you know how to return a particular folder size? Thank you

2024-05-22 10-21-41
Mohammad Hasib

Filipe Lourenço wrote:

mohammad hasib wrote:

Filipe Lourenço wrote:

Any way to return the disk size available and consumed from the device?

Dear Filipe,


One cordova plugin is available to check the disk size. you can wrap it in outsystems and get the result.

cordova plugin add org.apache.cordova.file

Please go through with the link:

https://www.thepolyglotdeveloper.com/2015/02/get-available-free-disk-space-using-apache-cordova/


Regards,




Yes it does but do you know how to return a particular folder size? Thank you


I did not tried it but as per the plugin the value of result is available free disk space and you can take one output parameter in javascript and assign the result value in it. 

cordova.exec(function(result) {    

alert("Free Disk Space: " + result);

}, 

function(error) {    

alert("Error: " + error)

;}, 

"File", "getFreeDiskSpace", []);

Regards,

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Filipe,

On a mobile device that's not as straightforward as for a desktop computer. A mobile device may have many partitions, and a mobile app may be moved (at least on Android) between the SD card and the on-board flash memory. I think on iOS, an App can't even access the local file system in a generic way at all, afaik, so knowing the free space doesn't help you there.

2024-05-22 10-21-41
Mohammad Hasib
Solution

Filipe Lourenço wrote:

Any way to return the disk size available and consumed from the device?

Dear Filipe,


One cordova plugin is available to check the disk size. you can wrap it in outsystems and get the result.

cordova plugin add org.apache.cordova.file

Please go through with the link:

https://www.thepolyglotdeveloper.com/2015/02/get-available-free-disk-space-using-apache-cordova/


Regards,



2024-01-05 16-00-17
Filipe Lourenço

mohammad hasib wrote:

Filipe Lourenço wrote:

Any way to return the disk size available and consumed from the device?

Dear Filipe,


One cordova plugin is available to check the disk size. you can wrap it in outsystems and get the result.

cordova plugin add org.apache.cordova.file

Please go through with the link:

https://www.thepolyglotdeveloper.com/2015/02/get-available-free-disk-space-using-apache-cordova/


Regards,




Yes it does but do you know how to return a particular folder size? Thank you

2024-05-22 10-21-41
Mohammad Hasib

Filipe Lourenço wrote:

mohammad hasib wrote:

Filipe Lourenço wrote:

Any way to return the disk size available and consumed from the device?

Dear Filipe,


One cordova plugin is available to check the disk size. you can wrap it in outsystems and get the result.

cordova plugin add org.apache.cordova.file

Please go through with the link:

https://www.thepolyglotdeveloper.com/2015/02/get-available-free-disk-space-using-apache-cordova/


Regards,




Yes it does but do you know how to return a particular folder size? Thank you


I did not tried it but as per the plugin the value of result is available free disk space and you can take one output parameter in javascript and assign the result value in it. 

cordova.exec(function(result) {    

alert("Free Disk Space: " + result);

}, 

function(error) {    

alert("Error: " + error)

;}, 

"File", "getFreeDiskSpace", []);

Regards,

2024-01-05 16-00-17
Filipe Lourenço

Yes but it does not return the size of a folder

2024-05-22 10-21-41
Mohammad Hasib

Filipe Lourenço wrote:

Yes but it does not return the size of a folder

In which os you are trying in IOS or android?

I will try it from my side and will let you know.

Regards,

2024-01-05 16-00-17
Filipe Lourenço

Both. Thanks

2024-05-22 10-21-41
Mohammad Hasib

Filipe Lourenço wrote:

Both. Thanks

Dear Filipe,

Is it showing you the value in alert? 

Regards,


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.