blob: 49856f2f33faaf37a8fe579e98b501c8ac1826fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
package kotlinx.atomicfu.plugin.gradle.internal
import java.io.*
import kotlin.test.*
fun File.checkExists() {
assertTrue(exists(), "File does not exist: $canonicalPath")
}
fun File.filesFrom(relative: String) = resolve(relative)
.readLines().asSequence().flatMap { listFiles(it) }.toHashSet()
fun listFiles(dir: String): Sequence<File> = File(dir).walk().filter { it.isFile }
|