Skip to content

Getting date added timestamp of file #59

@ridhwaans

Description

@ridhwaans

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions