dependency-check-core/src/main/java/org/owasp/dependencycheck/Engine.java
/**
     * Recursively scans files and directories. Any dependencies identified are
     * added to the dependency collection.
     *
     * @param dir the directory to scan
     * @param projectReference the name of the project or scope in which the
     * dependency was identified
     * @return the list of Dependency objects scanned
     * @since v1.4.4
     */
Recursively scans files and directories. Any dependencies identified are
added to the dependency collection.

@param dir the directory to scan
@param projectReference the name of the project or scope in which the
dependency was identified
@return the list of Dependency objects scanned
@since v1.4.4
Recursively scans files and directories . Any dependencies identified are added to the dependency collection . @param dir the directory to scan @param projectReference the name of the project or scope in which the dependency was identified @return the list of Dependency objects scanned @since v1 . 4 . 4
protected List<Dependency> scanDirectory(File dir, String projectReference) {
        final File[] files = dir.listFiles();
        final List<Dependency> deps = new ArrayList<>();
        if (files != null) {
            for (File f : files) {
                if (f.isDirectory()) {
                    final List<Dependency> d = scanDirectory(f, projectReference);
                    if (d != null) {
                        deps.addAll(d);
                    }
                } else {
                    final Dependency d = scanFile(f, projectReference);
                    deps.add(d);
                }
            }
        }
        return deps;
    }
protected List < Dependency > scanDirectory ( File dir , String projectReference ) { final File [ ] files = dir . listFiles ( ) ; final List < Dependency > deps = new ArrayList < > ( ) ; if ( files != null ) { for ( File f : files ) { if ( f . isDirectory ( ) ) { final List < Dependency > d = scanDirectory ( f , projectReference ) ; if ( d != null ) { deps . addAll ( d ) ; } } else { final Dependency d = scanFile ( f , projectReference ) ; deps . add ( d ) ; } } } return deps ; }
Recursively scans files and directories.
Recursively scans files and directories .