Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to enumerate resources?

Reply
Thread Tools

How to enumerate resources?

 
 
Rene Ruppert
Guest
Posts: n/a
 
      07-07-2004
Hi,

I'm trying to get an enumeration of all "files" from my resources.
I tried getResources("resource/media/gifs/*") and similar constructions -
without success.
Is there a way to get a listing of all resources in a special package?

Thanks.

cu

Rene


 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      07-07-2004
On Wed, 7 Jul 2004 11:41:39 +0200, Rene Ruppert wrote:

> Is there a way to get a listing of all resources in a special package?


No.

Though there are particular situations where
it is possible to find out what resources exist...

'At this moment' in a file system 'package'
(directory) using File.listFiles().

OTOH resources soming from Zip/Jar can be
determined from the enumeration of ZipEntries.

Since it is such a rare occurrence though, it
begs the question. Why do you think you need
to do this?

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      07-07-2004
On Wed, 07 Jul 2004 10:42:57 GMT, Andrew Thompson
<(E-Mail Removed)> wrote or quoted :

>Since it is such a rare occurrence though, it
>begs the question. Why do you think you need
>to do this?


Normally what you do is create the list as a property file or
serialised collection and include it in the jar.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
enumerate roles a user belongs to ? (seek vb.net sample) Mad Scientist Jr ASP .Net 1 08-31-2004 05:28 PM
How to enumerate sessions? Arsen Vladimirskiy ASP .Net 2 01-09-2004 03:31 PM
Enumerate Control Attributes? localhost ASP .Net 7 12-22-2003 01:05 PM
enumerate Users in Activedirectory group shiv ASP .Net 3 12-03-2003 08:55 PM
Enumerate Roles? poi ASP .Net 1 11-15-2003 02:48 AM



Advertisments