Getting File Size without Reading Entire File
fs.stat(path, function(err, stat) {
if(err) {
// handle error
}
console.log(stat.size);
});
Written by Charlie Key
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Files
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#