🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.swing
2 messages
2 total messages Started by Anton Mon, 04 Jul 2005 22:56
How to read file names?
#557
Author: Anton
Date: Mon, 04 Jul 2005 22:56
7 lines
1034 bytes
Hi.

I would like to know which is the process to read from a directory I pass to 
my function, all the files in that directory and put them in
a table, one row per file with its name.

Thanks
Re: How to read file names?
#558
Author: Alexey N. Solofnenko
Date: Tue, 05 Jul 2005 00:44
23 lines
1401 bytes
Something like:

File[] files=new File(dir).listFiles();
for (int i=0, l=files.length; i<l; ++i) {
   tableModel.add(files[i].getName()); // or something like that
}

- Alexey.

Anton wrote:
> Hi.
> 
> I would like to know which is the process to read from a directory I pass to 
> my function, all the files in that directory and put them in
> a table, one row per file with its name.
> 
> Thanks
> 
> 

-- 
Alexey N. Solofnenko
home: http://trelony.cjb.net/
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads