How can I evaluate the size of a file?

asked 17.08.2012 at 10:34

Raphael%20S%C3%BCess's gravatar image

Raphael Süess
(suspended)
accept rate: 0%


The method length works if you call it on a java.io.File class. A condition which filters file that are smaller than 1 MB looks like this:
Java.new("java.io.File", "C:/path_to_your_files/files/"+in.myFile.getPath()).length() < 1024000

link

answered 28.08.2012 at 10:54

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
9.4k31958
accept rate: 70%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×24

Asked: 17.08.2012 at 10:34

Seen: 1,861 times

Last updated: 17.08.2012 at 10:34