Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node fs get directory creation date

const fs = require('fs');

// fetch file details
fs.stat('file.txt', (err, stats) => {
    if(err) {
        throw err;
    }

    console.log(`File Data Creation: ${stats.birthtime}`);
});
Source by futurestud.io #
 
PREVIOUS NEXT
Tagged: #node #fs #directory #creation #date
ADD COMMENT
Topic
Name
9+6 =