mirror of
https://github.com/status-im/react-native-fs.git
synced 2025-03-01 07:20:33 +00:00
getFSInfo changed to use JS serializable WritableMap instead of HashMap
This commit is contained in:
parent
33d637e42e
commit
01d43a011a
@ -315,9 +315,9 @@ public class RNFSManager extends ReactContextBaseJavaModule {
|
|||||||
totalSpace = blockSize * stat.getBlockCount();
|
totalSpace = blockSize * stat.getBlockCount();
|
||||||
freeSpace = blockSize * stat.getAvailableBlocks();
|
freeSpace = blockSize * stat.getAvailableBlocks();
|
||||||
}
|
}
|
||||||
HashMap info = new HashMap();
|
WritableMap info = Arguments.createMap();
|
||||||
info.put("totalSpace", totalSpace);
|
info.putDouble("totalSpace", (double)totalSpace); // Int32 too small, must use Double
|
||||||
info.put("freeSpace", freeSpace);
|
info.putDouble("freeSpace", (double)freeSpace);
|
||||||
callback.invoke(null, info);
|
callback.invoke(null, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user