Reading a directory

J

jack.smith.sam

Hi All,

I have a folder with lots of file. Is there any way that I read each
file of this folder using Java?

Thanks
 
A

Andrew Thompson

I have a folder with lots of file. Is there any way that I read each
file of this folder using Java?

Sure, you can make a File from a folder. Look closely
at the File methods for your answer.

Andrew T.
 
J

Jussi Piitulainen

I have a folder with lots of file. Is there any way that I
read each file of this folder using Java?

The main class to do with file names is java.io.File. It has
a method for getting the names of the files in a directory
as File[], among other things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top