|
|
|
@ -516,12 +516,17 @@ function clearJkSort() { |
|
|
|
|
// 读取目录路径下文件输入数组
|
|
|
|
|
function readDir(path) { |
|
|
|
|
let names = []; |
|
|
|
|
if(path){ |
|
|
|
|
if(path.startsWith('hiker://')){ |
|
|
|
|
path = getPath(path); |
|
|
|
|
} |
|
|
|
|
let file = new java.io.File(path.replace("file://", "")); |
|
|
|
|
|
|
|
|
|
if (!(file.exists() && file.isDirectory())) return names; |
|
|
|
|
for (let it of file.listFiles()) { |
|
|
|
|
names.push(String(it.getName())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return names; |
|
|
|
|
} |
|
|
|
|
log(readDir(jkfilespath)); |
|
|
|
|