Getting the filenames of all files in a folder [duplicate]

I need to create a list with all names of the files in a folder.

For example, if I have:

000.jpg
012.jpg
013.jpg

I want to store them in a ArrayList with [000,012,013] as values.

What’s the best way to do it in Java ?

PS: I’m on Mac OS X

3 Answers
3

Leave a Comment