How to find detect file size in Node.js
Published Saturday, January 16, 2021
fs.stat function you can retreive the file size in bytes of any file in the file system:
this is my code 413
fs.stat is useful in other contexts as well, such as when determining when a file was created or modified.