title: How to list all files from the resources directory
body: <p>Source is a Java Maven project. </p>
  
  <p>Java <strong>resources</strong> directory contains subdirectories that contain configuration files. Config files can be added and removed as a maintenance process. Names of files not suppose to be known. </p>
  
  <p>How I can get a list of all files in a mentioned project "resources" directory?</p>
  
  <p>There is a solution using Spring framework class <code>PathMatchingResourcePatternResolver</code>, however this class requires Apache Commons Logging and when dependency added the project is getting set to java 1.7 source from 1.8 that breaks existing code compatibility. </p>
  
  <p>Does java have a class that can list files of a mentioned folder, or java was never need it?</p>
  
  <p>Update:
  Was able to resolve the issue with this solution (else condition //Run with IDE)
  <a href="https://stackoverflow.com/a/20073154/323128">https://stackoverflow.com/a/20073154/323128</a></p>
  
  <p><em>path</em> is a folder name inside "resources" directory. </p>