|
@@ -104,6 +104,7 @@ function getLastFile(dirPath, number, callback) {
|
|
// 按照倒叙获取,如果一个文件内容满足num,就不在继续查询,如果不够,继续获取文件
|
|
// 按照倒叙获取,如果一个文件内容满足num,就不在继续查询,如果不够,继续获取文件
|
|
for (var i = fileList.length - 1; i >= 0; i--) {
|
|
for (var i = fileList.length - 1; i >= 0; i--) {
|
|
var file = fileList[i];
|
|
var file = fileList[i];
|
|
|
|
+ logger.info(`--------02..00`, dirPath, file)
|
|
const filePath = path.join(dirPath, file);
|
|
const filePath = path.join(dirPath, file);
|
|
const stats = await fs.promises.stat(filePath);
|
|
const stats = await fs.promises.stat(filePath);
|
|
fileList.push({name: file, time: stats.mtimeMs});
|
|
fileList.push({name: file, time: stats.mtimeMs});
|
|
@@ -114,7 +115,7 @@ function getLastFile(dirPath, number, callback) {
|
|
}
|
|
}
|
|
|
|
|
|
// for (file of files) {
|
|
// for (file of files) {
|
|
- // logger.info(`--------02..00`, dirPath, file)
|
|
|
|
|
|
+ //
|
|
// const filePath = path.join(dirPath, file);
|
|
// const filePath = path.join(dirPath, file);
|
|
// logger.info(`--------02..111`, filePath)
|
|
// logger.info(`--------02..111`, filePath)
|
|
// const stats = await fs.promises.stat(filePath);
|
|
// const stats = await fs.promises.stat(filePath);
|