This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Chapter 6 - page 456 - search.list()

 
fadi aboona
Ranch Hand
Posts: 71
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
The following code:



The following output:


why it wouldn't show subSubDir directory?
i hope the answer is not something silly i overlooked!!
Thank you.
 
Shaikh Ali
Ranch Hand
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe search.list() only returns the contents of newDir only, not its subfolders. You can write an elegant recursive function to achieve what you want
 
fadi aboona
Ranch Hand
Posts: 71
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Faraz Kadri wrote:I believe search.list() only returns the contents of newDir only, not its subfolders. You can write an elegant recursive function to achieve what you want


Thank you,
but in this case i have to create a file for each directory? maybe i'm thinking ahead of myself here! i think this is achievable with collections!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic