开发者

J2ME : How to get SDCard's available Free Space

开发者 https://www.devze.com 2023-03-08 12:00 出处:网络
I am building J2ME application, where I want to get size of avail开发者_如何学Goable free space on SDCard and on Phone internal storage.FileConnection fc = (FileConnection) Connector.open(\"file:///SD

I am building J2ME application, where I want to get size of avail开发者_如何学Goable free space on SDCard and on Phone internal storage.


FileConnection fc = (FileConnection) Connector.open("file:///SDCard/");

long total = fc.totalSize();

long used = fc.usedSize();

long free = total - used;   
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号