0

I am trying to find and print folder names through spring and jsp. I want to find folders' names and how many are there under /somefolder/ folder

I want the code to be in java style, please help!

4

1 に答える 1

2

There is File#listFiles to get the files in a directory, and you can use File#isDirectory to check if those are files or directories, either by looping over the result or by using a FileFilter that you pass to listFiles.

于 2012-09-26T00:35:03.017 に答える