Nere
Nere

Reputation: 4097

IONIC 3: How to read free storage capacity of mobile phone?

Well, I need to know the current free space from Android or iOS. Is there anyways that I can read the free space?

I need to store data into folder so I need to make sure there are still free space. If not, I will take another action.

Thanks!

Upvotes: 0

Views: 534

Answers (1)

Steven Scott
Steven Scott

Reputation: 11250

I have not tried it, but a quick Google shows that the @ionic-native/file might be what you need to use. From the documentation:

getFreeDiskSpace() Get free disk space in Bytes

Returns: Promise Returns a promise that resolves with the remaining free disk space in Bytes

Upvotes: 1

Related Questions