I am looking for access to all files in the local directory of a JBoss application. I can put the catalog anywhere in my war, including WEB-INF, if necessary. Then I want to access each file in the directory sequentially. In a regular application, if the directory was in the workplace, I could do something like:
File f = new File("myDir");
if(f.isDirectory && f.list().length != 0)
{
for(String fileName : f.list())
{
}
}
I am looking for the best solution, so if I am going to do it wrong, please show me the correct path to access an unknown set of resources.
source
share