File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Head First Android
this week in the
I/O and Streams
Joined: Feb 18, 2003
May 17, 2004 00:14:00
Could you please tell me how to get the properties of a File,Folder. I want to get the specially the File/Folder size etc.
SCJP 1.4, SCMAD 1.0<br />SCWCD, SCBCD (in progress)
Joined: Mar 18, 2004
May 17, 2004 00:22:00
See the File class specification from
You can get the size of the file using File class object
File f = new File("test.txt");
long size = f.length();
Joined: Dec 10, 2001
May 17, 2004 12:08:00
Moving this to the I/O and Streams forum...
How To Ask Good Questions
JavaRanch FAQ Wiki
I agree. Here's the link:
subject: File properties
placing propertie file in .war file
JBOSS configuring properties fies in classpath
FileNotFoundException When Trying to Read from a .properties file
Log4j not complaining but not printing anything too
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015