We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f53f21b + 68856d5 commit 60212b2Copy full SHA for 60212b2
src/android/DirectoryManager.java
@@ -85,9 +85,7 @@ public static long getFreeExternalStorageSpace() {
85
public static long getFreeSpaceInBytes(String path) {
86
try {
87
StatFs stat = new StatFs(path);
88
- long blockSize = stat.getBlockSize();
89
- long availableBlocks = stat.getAvailableBlocks();
90
- return availableBlocks * blockSize;
+ return stat.getAvailableBytes();
91
} catch (IllegalArgumentException e) {
92
// The path was invalid. Just return 0 free bytes.
93
return 0;
0 commit comments