File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes I/O and Streams and the fly likes file details[urgent] Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Reply Bookmark "file details[urgent]" Watch "file details[urgent]" New topic
Author

file details[urgent]

netharam ram
Ranch Hand

Joined: Aug 09, 2001
Posts: 202
Hi, how can we get the details of a file such as date created,last modified date,etc?If the file is a drive ,how to get the details of the drive such as capacity, whether it is a local drive,or floppy drive, cd-ROM drive etc.
Please reply me as soon as possible.
Happy middling with java.
Bye from netharam.
Muhammad sibtain
Greenhorn

Joined: Aug 31, 2001
Posts: 17
there are many methods in File Class
such as
1. listRoots() returns all drive letters info.
2. lastModified() returns last modification date.
these two i know all others i also wanted to know
Regards
Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
Originally posted by netharam ram:
If the file is a drive ,how to get the details of the drive such as capacity, whether it is a local drive,or floppy drive, cd-ROM drive etc.

A java File object cannot represent a drive. It can represent the root directory of a drive (in the world of Windows), but that's still a directory, not particularly different to any other, really.
I do not know of any Java API for getting information about storage hardware (hard drives, mounted network drives, CDs etc.). I think that's a bit low-level for Java.
[ January 31, 2002: Message edited by: Peter Chase ]

Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.<br /> <br />#:^P
 
 
subject: file details[urgent]
 
Threads others viewed
Saving a file to a relative path
Problem with Calendar Control in java due to DST
Getting drive details[urgent]
Update JSP thru ANT
java web start
IntelliJ Java IDE