The Java File-object can be used to represent files and folders. Create a File object to represent your folder:
File folder = new File(pathname)
.
Then use the method listFiles()
on this object to retrieve all files and subfolders of this folder.
for(File file : folder.listFiles()) {
// doSomething(file)
}