Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Recursively list all files in a jar  RSS feed

 
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: 22185
38
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!