private Set < String > findResourceNamesFromFileSystem ( String classPathRootOnDisk , String scanRootLocation , File folder ) { LOGGER . debug ( "Scanning for resources in path: {} ({})" , folder . getPath ( ) , scanRootLocation ) ; File [ ] files = folder . listFiles ( ) ; if ( files == null ) { return emptySet ( ) ; } Set < String > resourceNames = new TreeSet <> ( ) ; for ( File file : files ) { if ( file . canRead ( ) ) { if ( file . isDirectory ( ) ) { resourceNames . addAll ( findResourceNamesFromFileSystem ( classPathRootOnDisk , scanRootLocation , file ) ) ; } else { resourceNames . add ( toResourceNameOnClasspath ( classPathRootOnDisk , file ) ) ; } } } return resourceNames ; }
Finds all the resource names contained in this file system folder .