Walks through specified directory or directories and returns last change date of all tree. Technically it is the newest modified or created date of all files in specified dir
Last modified date in this readme and code means newest date for each directory and file recursively from:
- node-glob syntax support https://github.com/isaacs/node-glob
- excludes
- optional ability to skip missing paths. False by default?
- ability to get list of files modified since specified date
You can specify not only directory, but file. And array of files and directories mixed.
let rlm = require('recursive-last-modified');
console.log(rlm('.')) // prints last modified date of current folder and all its content
console.log(rlm(['dir1', 'dir2'])) // prints newest last modified date of dir1, dir2 and all content in them
console.log(rlm('path/to/some/file.txt')) // prints last modified date of path/to/some/file.txt
Development of the project was sponsored by Crazy Panda
Licensed in terms of MIT license (see https://github.com/Busyrev/recursive-last-modified/blob/master/LICENSE file).