io.github.ackeecz.danger.dependenciescheck.FileFinder.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of danger-kotlin-dependencies-check Show documentation
Show all versions of danger-kotlin-dependencies-check Show documentation
Plugin for danger-kotlin for checking project dependencies (e.g. new available updates or vulnerabilities)
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