Skip to content

Commit d2625f7

Browse files
committed
more logging
1 parent 460622f commit d2625f7

File tree

1 file changed

+7
-2
lines changed
  • core/src/main/kotlin/com/tschuchort/compiletesting

1 file changed

+7
-2
lines changed

core/src/main/kotlin/com/tschuchort/compiletesting/Utils.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,17 @@ internal fun isJdk9OrLater(): Boolean
3333
internal fun File.listFilesRecursively(): List<File> {
3434
return (listFiles() ?: throw RuntimeException("listFiles() was null. File is not a directory or I/O error occured"))
3535
.flatMap { file ->
36-
if(file.isDirectory)
36+
if(file.isDirectory) {
37+
println("File is directory: ${file.absolutePath}")
3738
file.listFilesRecursively()
38-
else
39+
} else
40+
println("File is file: ${file.absolutePath}")
3941
listOf(file)
4042
}
4143
}
44+
//internal fun File.listFilesRecursively(): List<File> = walkTopDown().onEach {
45+
// println("Walked${it.absolutePath}")
46+
//}.filter { it.isFile }.toList()
4247

4348
internal fun Path.listFilesRecursively(): List<Path> {
4449
val files = mutableListOf<Path>()

0 commit comments

Comments
 (0)