File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
core/src/main/kotlin/com/tschuchort/compiletesting Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -33,12 +33,17 @@ internal fun isJdk9OrLater(): Boolean
33
33
internal fun File.listFilesRecursively (): List <File > {
34
34
return (listFiles() ? : throw RuntimeException (" listFiles() was null. File is not a directory or I/O error occured" ))
35
35
.flatMap { file ->
36
- if (file.isDirectory)
36
+ if (file.isDirectory) {
37
+ println (" File is directory: ${file.absolutePath} " )
37
38
file.listFilesRecursively()
38
- else
39
+ } else
40
+ println (" File is file: ${file.absolutePath} " )
39
41
listOf (file)
40
42
}
41
43
}
44
+ // internal fun File.listFilesRecursively(): List<File> = walkTopDown().onEach {
45
+ // println("Walked${it.absolutePath}")
46
+ // }.filter { it.isFile }.toList()
42
47
43
48
internal fun Path.listFilesRecursively (): List <Path > {
44
49
val files = mutableListOf<Path >()
You can’t perform that action at this time.
0 commit comments