Problem Statement
How do you get information about a file in Node.js?
Explanation
Use `fs.stat()` to get metadata like size, creation date, and modification time. It’s asynchronous and part of the core `fs` module.
Code Solution
SolutionRead Only
const fs=require('fs');
fs.stat('file.txt',(err,stats)=>console.log(stats.size));