|
@ -110,13 +110,19 @@ public class FileManagerController {
|
110
|
110
|
// System.out.println(dataPath + dir);
|
111
|
111
|
File[] fileList = file.listFiles();
|
112
|
112
|
|
113
|
|
ArrayList<String> dList = new ArrayList<>();
|
114
|
|
ArrayList<Map<String, Object>> fList = new ArrayList<>();
|
|
113
|
// ArrayList<String> dList = new ArrayList<>();
|
|
114
|
ArrayList<String> resultList = new ArrayList<>();
|
|
115
|
// ArrayList<Map<String, Object>> fList = new ArrayList<>();
|
115
|
116
|
|
116
|
117
|
for (int i = 0; i < fileList.length; i++) {
|
117
|
118
|
if (fileList[i].isDirectory()) {
|
118
|
119
|
String fileName = fileList[i].getName();
|
119
|
|
dList.add(fileName);
|
|
120
|
long time = fileList[i].lastModified();
|
|
121
|
Map<String, Object> dfile = new HashMap<String, Object>();
|
|
122
|
dfile.put('fileName', fileName);
|
|
123
|
dfile.put("modifyTime", time);
|
|
124
|
// dList.add(fileName);
|
|
125
|
resultList.add(dfile);
|
120
|
126
|
// System.out.println("文件:" + fileName);
|
121
|
127
|
// System.out.println(fileName);
|
122
|
128
|
}
|
|
@ -132,15 +138,17 @@ public class FileManagerController {
|
132
|
138
|
ofile.put("fileName", fileName);
|
133
|
139
|
ofile.put("suffix", suffix);
|
134
|
140
|
ofile.put("size", size);
|
135
|
|
ofile.put("time", time);
|
|
141
|
ofile.put("modifyTime", time);
|
136
|
142
|
|
137
|
|
fList.add(ofile);
|
|
143
|
// fList.add(ofile);
|
|
144
|
resultList.add(ofile);
|
138
|
145
|
// System.out.println("文件:" + fileName);
|
139
|
146
|
// System.out.println(fileName);
|
140
|
147
|
}
|
141
|
148
|
}
|
142
|
|
result.put("fList", fList);
|
143
|
|
result.put("dList", dList);
|
|
149
|
// result.put("fList", fList);
|
|
150
|
// result.put("dList", dList);
|
|
151
|
result.put("resultList", resultList);
|
144
|
152
|
result.put("activepath", dir);
|
145
|
153
|
// System.out.println(dir);
|
146
|
154
|
return R.ok(result);
|