pull/42/head
kunfei 5 years ago
parent 9b441bd079
commit 9714d1175d
  1. 5
      app/src/main/java/io/legado/app/ui/filechooser/utils/ConvertUtils.kt
  2. 6
      app/src/main/java/io/legado/app/ui/filechooser/utils/FileUtils.kt

@ -11,7 +11,6 @@ import java.io.IOException
import java.io.InputStream
import java.io.InputStreamReader
import java.text.DecimalFormat
import java.util.*
/**
* 数据类型转换单位转换
@ -51,10 +50,6 @@ object ConvertUtils {
}
}
fun toString(objects: Array<Any>): String {
return Arrays.deepToString(objects)
}
fun toString(objects: Array<Any>, tag: String): String {
val sb = StringBuilder()
for (`object` in objects) {

@ -80,7 +80,7 @@ object FileUtils {
}
for (dir in dirs) {
val file = dir.absoluteFile
if (!ConvertUtils.toString(excludeDirs).contains(file.name)) {
if (!excludeDirs.contentDeepToString().contains(file.name)) {
dirList.add(file)
}
}
@ -193,8 +193,8 @@ object FileUtils {
val file = File(startDirPath)
return file.listFiles { dir, name ->
//返回当前目录所有以某些扩展名结尾的文件
val extension = FileUtils.getExtension(name)
ConvertUtils.toString(allowExtensions).contains(extension)
val extension = getExtension(name)
allowExtensions.contentDeepToString().contains(extension)
}
}

Loading…
Cancel
Save