core/src/main/java/org/owasp/dependencycheck/Engine.java
/**
     * Scans a given file or directory. If a directory is specified, it will be
     * scanned recursively. Any dependencies identified are added to the
     * dependency collection.
     *
     * @param file the path to a file or directory to be analyzed
     * @param projectReference the name of the project or scope in which the
     * dependency was identified
     * @return the list of dependencies scanned
     * @since v1.4.4
     */
Scans a given file or directory. If a directory is specified, it will be
scanned recursively. Any dependencies identified are added to the
dependency collection.

@param file the path to a file or directory to be analyzed
@param projectReference the name of the project or scope in which the
dependency was identified
@return the list of dependencies scanned
@since v1.4.4
Scans a given file or directory . If a directory is specified it will be scanned recursively . Any dependencies identified are added to the dependency collection . @param file the path to a file or directory to be analyzed @param projectReference the name of the project or scope in which the dependency was identified @return the list of dependencies scanned @since v1 . 4 . 4
public List<Dependency> scan(File file, String projectReference) {
        if (file.exists()) {
            if (file.isDirectory()) {
                return scanDirectory(file, projectReference);
            } else {
                final Dependency d = scanFile(file, projectReference);
                if (d != null) {
                    final List<Dependency> deps = new ArrayList<>();
                    deps.add(d);
                    return deps;
                }
            }
        }
        return null;
    }
public List < Dependency > scan ( File file , String projectReference ) { if ( file . exists ( ) ) { if ( file . isDirectory ( ) ) { return scanDirectory ( file , projectReference ) ; } else { final Dependency d = scanFile ( file , projectReference ) ; if ( d != null ) { final List < Dependency > deps = new ArrayList < > ( ) ; deps . add ( d ) ; return deps ; } } } return null ; }
Scans a given file or directory.
Scans a given file or directory .