Source is a Java Maven project.
Java resources 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.
How I can get a list of all files in a mentioned project "resources" directory?
There is a solution using Spring framework class PathMatchingResourcePatternResolver
, 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.
Does java have a class that can list files of a mentioned folder, or java was never need it?
Update: Was able to resolve the issue with this solution (else condition //Run with IDE) https://stackoverflow.com/a/20073154/323128
path is a folder name inside "resources" directory.