|
@@ -101,9 +101,9 @@ function getLastFile(dirPath, number, callback) {
|
|
|
let fileList = [];
|
|
|
//提示日志默认是根据日志生成的,拿到的files 也是 按照生成日志排序的,所以
|
|
|
// 按照倒叙获取,如果一个文件内容满足num,就不在继续查询,如果不够,继续获取文件
|
|
|
- // logger.info("文件:",files)
|
|
|
for (file of files) {
|
|
|
const filePath = path.join(dirPath, file);
|
|
|
+ logger.info("所有文件:",file)
|
|
|
const stats = await fs.promises.stat(filePath);
|
|
|
if (stats.isFile()) {
|
|
|
fileList.push({name: file, time: stats.birthtime.getTime()});
|