All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.ackeecz.danger.dependenciescheck.FileFinder.kt Maven / Gradle / Ivy

Go to download

Plugin for danger-kotlin for checking project dependencies (e.g. new available updates or vulnerabilities)

There is a newer version: 1.0.1
Show newest version
package io.github.ackeecz.danger.dependenciescheck

import java.io.File
import java.nio.file.Files
import java.nio.file.Path
import java.util.stream.Collectors

internal class FileFinder {

    fun findFiles(rootDirectoryPath: Path, fileName: String): List {
        val maxDepth = 10
        return Files.find(rootDirectoryPath, maxDepth, { path, _ -> path.toFile().name == fileName })
            .map { it.toFile() }
            .collect(Collectors.toList())
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy