mihneadb / node-directory-tree

Convert a directory tree to a JS object.
MIT License
523 stars 106 forks source link

date property #47

Closed vasyl-shumskyi closed 5 years ago

vasyl-shumskyi commented 6 years ago

It would be cool to have date property as well. mtime will be best choice I think.

meta-exception commented 5 years ago

Added in 2.2.0. Use attributes prop.

const dirTree = require('directory-tree');
const filteredTree = dirTree('/some/path', { attributes: ['mtime'] });
mihneadb commented 5 years ago

Thanks, @meta-exception !