if I use openFileOutput() to create and write to a temp file how do I get filesize after I’m done writing to it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I hope this can help you:
Where the String
selectedPathis the path to the file whose file size you want to determine.file.length()returns the length of the file in bytes, as described in the Java 7 Documentation:Dividing by 1024 converts the size from bytes to kibibytes. kibibytes = 1024 bytes.