• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Get a List of all files given a Directory\Volume Name

 
Rob Bass
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know how to do this? I used the File Object but it only retrieves files in the currently directory it does not go into the subdirectories.
Thanks,
Rob
 
Wilfried LAURENT
Ranch Hand
Posts: 269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To my knowledge, there is no such facility in the jdk1.3. Here is a solution to an exercise which looks very much like what you are looking for:
http://math.hws.edu/javanotes/c11/ex-11-1-answer.html
W.
 
Rob Bass
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
recursion is the answer. Thanks again.
Rob
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic