I am looking to find the size of a file in Android. I originally expected it to be as simple as a size() method in File, or something along those lines. But I haven't been able to find anything. Any help would be greatly 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 the file denoted by this abstract pathname, or 0L if the file does not exist. Some operating systems may return 0L for pathnames denoting system-dependent entities such as devices or pipes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With