• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

file details[urgent]

 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1970
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ]
 
CAUTION! Do not touch the blades on your neck propeller while they are active. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic