Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

recursive methods

 
Ravindra Suroju
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I want to print the absolute path of all files (including the files in subfolders) in a given directory [C:/Source]. Please help me what is wrong with my code...

 
Joanne Neal
Rancher
Pie
Posts: 3742
16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What makes you thing there's something wrong with it ? Does it not compile (show us the error messages) or does it not do what you expected (tell us what it does do and how this differs from what you expected).
 
Bob Good
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Class names should begin with a capital (Test not test)
2) Instance variables should be non capitalized (directory not Directory, path not Path)
2) You have provided no comments
3) directory.getDirectoryList("/" + args[0]); <== corrected
4) File tempFile = new File(path + "/" + dirContents[i]); <== corrected

You were very close.
 
Ravindra Suroju
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks so much Bob...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic