The moose likes Beginning Java and the fly likes Reading directory structure... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Reading directory structure..." Watch "Reading directory structure..." New topic

Reading directory structure...

Daniel Prene
Ranch Hand

Joined: Jul 15, 2005
Posts: 241
I was wondering if there was a way to retreive directory structure information from within a java application?

Thank you for your time,

Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
Yes. In java.io.File you can get a list of the files in a directory. There are also methods to tell you whether it is a file or directory.
Daniel Prene
Ranch Hand

Joined: Jul 15, 2005
Posts: 241
Thank you for the information!
It is sorta covered in the JavaRanch Style Guide.
subject: Reading directory structure...
Similar Threads
Package Problem
How can I get my HelloWorld Servlet to Run?
App doesn't work
Test class cannot find other class
In struts I am getting an error