java - How to calculate the size of a file in Android -


i looking find size of file in android. expected simple size() method in file, or along lines. haven't been able find anything. appreciated.

thanks

use file.length()

http://download.oracle.com/javase/6/docs/api/java/io/file.html#length%28%29

the length, in bytes, of file denoted abstract pathname, or 0l if file not exist. operating systems may return 0l pathnames denoting system-dependent entities such devices or pipes.


Comments