Re: io: how many imgs in 'images' folder?
- From: Eric Sosman <Eric.Sosman@xxxxxxx>
- Date: Thu, 29 Mar 2007 15:36:28 -0400
maya wrote On 03/29/07 13:55,:
is it possible to determine how many files are in a given directory..
Use the list() or listFiles() methods of a File object
representing the directory.
I have this photoblog,
http://www.francesdelrio.com/photoblog/blog1/photos.jsp
not all pgs have same no. of photos, and I would like to know how to
determine how many photos are in 'images' folder for each page, to then
populate an array (or would it have to be a vector?)
list() and listFiles() return arrays. You could use
them to populate a Vector or an ArrayList or whatever else
you like, if you think it would be fun.
also I want to associate each photo w/its caption, in that case it would
have to be a hash-table? (or put everything in db?)
I'm not sure where you obtain the captions. If they're
just the file names, that's no problem: you get them when
list() or listFiles() reports the directory's contents. If
they're coming from somewhere else (JPEG comments embedded
in the photos, maybe?), you'll need to do extra work to
extract them.
Hash table? Data base? Maybe, but probably not. What
do you think they will do for you?
I have a new digital camera, I will be posting A LOT of photos from now
on, am trying to figure out what best approaches are here...
thank you...
--
Eric.Sosman@xxxxxxx
.
- Follow-Ups:
- Re: io: how many imgs in 'images' folder?
- From: Nigel Wade
- Re: io: how many imgs in 'images' folder?
- From: Lew
- Re: io: how many imgs in 'images' folder?
- References:
- io: how many imgs in 'images' folder?
- From: maya
- io: how many imgs in 'images' folder?
- Prev by Date: Re: Applets doesn't close
- Next by Date: Re: io: how many imgs in 'images' folder?
- Previous by thread: io: how many imgs in 'images' folder?
- Next by thread: Re: io: how many imgs in 'images' folder?
- Index(es):
Relevant Pages
|
|