package com.zxhy.hfilemanagermaster.knife

import java.io.File

fun traverseFolder(folder: File): ArrayList<File> {
    val fileList = arrayListOf<File>()
    folder.listFiles()?.forEach {
        if (it.isDirectory) {
            fileList.addAll(traverseFolder(it))
        } else {
            fileList.add(it)
        }
    }
    return fileList
}