Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting date added timestamp of file #59

Open
ridhwaans opened this issue Feb 11, 2019 · 0 comments
Open

Getting date added timestamp of file #59

ridhwaans opened this issue Feb 11, 2019 · 0 comments

Comments

@ridhwaans
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant