This piece of code gets all the files in a given directory
var node_dir = require('node-dir');
...
node_dir.files(dir, function(err, files) {
files.forEach( function( file, index ) {
file = file.replace(/^.*[\\\/]/, ''); // get filename from full filepath
console.log('GET: ' + file);
I want to know if node-dir can get the datetime when a file is added to a directory, as it knows the full path. Should work on Windows, Linux & Mac filesystems.
This piece of code gets all the files in a given directory
I want to know if node-dir can get the datetime when a file is added to a directory, as it knows the full path. Should work on Windows, Linux & Mac filesystems.