Search
 
SCRIPT & CODE EXAMPLE
 

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}`);
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: scrollto element by id center 
Javascript :: LazyLoad for images, Videos and Iframes JavaScript and JQuery 
Javascript :: load script js 
Javascript :: jest assert if empty array 
Javascript :: jquery post failure 
Javascript :: fetch in js 
Javascript :: jquery set route with parameters in url 
Javascript :: jquery hover function 
Javascript :: angular date formats 
Javascript :: conditionally set checkbox state in React 
Javascript :: js date format dd/mm/yyyy 
Javascript :: viewdata array mvc razor javascript 
Javascript :: file input disable open file picker javascript 
Javascript :: how to make a plinko game using javascript 
Javascript :: js touch relative pos 
Javascript :: javascript scp in to array 
Javascript :: exiting jshell 
Javascript :: javascript howto get xhr 
Javascript :: jquery set title 
Javascript :: how to get file extension in javascript last index 
Javascript :: node check if not connected to internet 
Javascript :: addAtribute 
Javascript :: vs code prevent auto grml closing in js files 
Javascript :: how to find duplicate item in array of object in javascript 
Javascript :: add last element in array javascript 
Javascript :: join last element of array javascript with different value 
Javascript :: regular expression start and end with same character javascript 
Javascript :: jquery wysiwyg editor val acf 
Javascript :: Codewars Century From Year 
Javascript :: this.$set 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =