Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android - return available bytes instead of free bytes #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ath0mas
Copy link

@ath0mas ath0mas commented Dec 17, 2018

StatFs#getFreeBytes() is used to return free value on Android
described as:

The number of bytes that are free on the file system, including reserved blocks (that are not available to normal applications). Most applications will want to use getAvailableBytes() instead.

free space of reserved blocks / not available to normal applications does not seem to be relevant for us either

⇒ So, I suggest to use StatFs#getAvailableBytes() instead

(same "freeSpace" is implemented in cordova-diagnostic-plugin: Diagnostic_External_Storage.java#L178)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant