Skip to content

Commit

Permalink
feat: 优化文件遍历
Browse files Browse the repository at this point in the history
  • Loading branch information
chaojiong1zhang20230913 committed Mar 20, 2022
1 parent 6ffa97d commit ffd243e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/plugin/utils/FileUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ object FileUtil {
fun File.eachFileRecurse(closure: ((File) -> Boolean)?) {
var continueRecursion = false
listFiles()?.let {
it.forEach { file ->
for(file in it) {
if (file.isDirectory) {
continueRecursion = closure?.invoke(file) ?: true
if (continueRecursion) {
Expand Down

0 comments on commit ffd243e

Please sign in to comment.