Reputation: 349
I am looking for a way to check an external .exe creation date from within my electron application.
Any pointers would be greatly appreciated as I can't find any code via google.
Upvotes: 0
Views: 65
Reputation: 249
You can use node's fs
module to achieve what you want. Just use the following:
const fs = require('fs');
fs.stat('path-to-exe', (error, stats) => {
if (error) {
console.log(error);
}
else {
let creationTime = stats.birthtime;
console.log('Creation time: ', creationTime);
}
});
Upvotes: 1