更新 'SrcJyPublic.js'

master
src48597962 2 months ago
parent c1a5f15c26
commit 86970b1662
  1. 13
      SrcJyPublic.js

@ -516,11 +516,16 @@ function clearJkSort() {
// 读取目录路径下文件输入数组 // 读取目录路径下文件输入数组
function readDir(path) { function readDir(path) {
let names = []; let names = [];
let file = new java.io.File(path.replace("file://", "")); 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; if (!(file.exists() && file.isDirectory())) return names;
for (let it of file.listFiles()) { for (let it of file.listFiles()) {
names.push(String(it.getName())); names.push(String(it.getName()));
}
} }
return names; return names;
} }

Loading…
Cancel
Save