Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Determine File Size the fastest possible way  RSS feed

 
Denise Advincula
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

Is there a way in Java to determine the file size without actually traversing the whole file?
Like for example, in Windows Explorer, we see a file, then there's a size with it. Is there a way for Java to get this size shown in the explorer window?
Hoping for your kind assistance. Thank you!

 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at the API docs for java.io.File. . .
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!