• Welcome to Valhalla Legends Archive.
 

Filesize

Started by iago, February 02, 2004, 01:41 PM

Previous topic - Next topic

iago

Although I'm going to google search this, is there some way to find the size (in bytes) of a file without reading it in?  There's no method in class File to do it, so I'm not not sure where else to look.

Thanks!

(If I find the answer, I'll post it here of course)
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


iago

RandomAccessFile.length()
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Tuberload

File():
long length() : Returns the length of the file denoted by this abstract pathname.
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

iago

Quote from: Tuberload on February 02, 2004, 03:43 PM
File():
long length() : Returns the length of the file denoted by this abstract pathname.

ugh, I don't know how I missed that!

I was looking for getLength() and getSize(), and I must have read that list 10 times (I could have sworn that I had seen it last week, but that I couldn't find it!)
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Tuberload

I've done it a few times too.  ;)
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown