last-changed-files
v0.1.2
Published
Use fs.stat() to record the last modification date of the file and import the list of changed files.
Downloads
4
Readme
last-changed-files
Install
$ npm i --save last-changed-files
Usage
async
const lastChangedFiles = require('last-changed-files');
const path = './example'; // test1.txt, test2.txt, test3.txt ...
lastChangedFiles(path)
.then((list) => {
// =>[ {"mtime":"2020-05-27T04:41:07.029Z","name":"test1.txt"} ... ]
})
.catch((err) => {});
License
Copyright © 2020 Jun. Released under the MIT license.