returns 0

I have a applet where I need to check the size of a file on the hdd of the user.

Everything works, File.exists() returns true, but File.length() returns 0.

Is there a limitation, or some work around this?

I really need to know the size of the file, for download resume purposes, but can’t…


May be you may already opened that file for writing if so it will return 0.