Advertisement

[java] Slightly OT (again): Getting directories?

Started by June 30, 2000 07:30 AM
1 comment, last by Neophyte 24 years, 5 months ago
Here I am again This time I''m wondering about how to get a listing of the files/folders in a given directory with Java. I assume that, with Java''s platform-indepent policy, that the platform I''m developing on does not change the functions used. But if it does, I''m using Linux and Solaris. Again, any help at all is highly appreciated. -Neophyte ~Death awaits you all, with nasty, big, pointy teeth~
Try using java.io.File.list()

Be reading you,
David

--
===
Am I the keeper of my brother ?
Advertisement
Thank you!

Actually, I feel slightly stupid, because as soon as I saw your answer I checked my API-documentation and there it was, clear as day.
The problem, of course, with the API-docs, is that it''s very easy to find all the interesting information you want, provided you have a decent idea of where to begin in the first place.
Speaking for myself, I''m a pretty decent programmer, and while I''m not a wizz at Java I''m not completely helpless either. But I dont'' have all that much experience with it, so finding things in the API-docs is a bit of a drag. And as that''s more or less the only documentation I have for the moment (except a good book on Servlet-programming), things like this is a bit awkward to discover sometimes.

Ahm. This turned into a bit of a longer post than I had planned, but what the hey.

Anyway, as I said, thank you for the help I really appreciate it.
I''ll probably be back here with more innane questions, hope you don''t mind.

-Neophyte
~Death awaits you all, with nasty, big, pointy teeth~

This topic is closed to new replies.

Advertisement