code style opt, reduce build time : 1m30s
This commit is contained in:
@@ -50,9 +50,8 @@ fun deleteAllFile(file: File?) { //判断文件不为null或文件目录存在
|
||||
val files: Array<File> = file.listFiles()
|
||||
//遍历该目录下的文件对象
|
||||
for (f in files) {
|
||||
val name: String = file.getName()
|
||||
//判断子目录是否存在子目录,如果是文件则删除
|
||||
if (f.isDirectory()) {
|
||||
if (f.isDirectory) {
|
||||
deleteAllFile(f)
|
||||
} else {
|
||||
f.delete()
|
||||
|
||||
Reference in New Issue
Block a user