Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Recursively list all files in a jar

 
Garrett Rowe
Ranch Hand
Posts: 1296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jar with Scala source files in it and I want to list all the file names. It seems like it should be a pretty simple, but the best I could come up with is this convoluted mess. Please tell me there is a better way.

 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


If I'm not mistaken, this gives you all of the entries in the JAR. You don't need to do anything recursively.
 
Garrett Rowe
Ranch Hand
Posts: 1296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doh! You're absolutely correct Paul. I erroneously thought that since it explicitly listed the directories, it didn't list the files under the directories. Thanks for setting me straight.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic