Skip to content

Instantly share code, notes, and snippets.

@koji
Created January 30, 2019 21:25
Show Gist options
  • Save koji/16ddd13f669c8ab479fa0097fe183185 to your computer and use it in GitHub Desktop.
Save koji/16ddd13f669c8ab479fa0097fe183185 to your computer and use it in GitHub Desktop.
get file size with nodejs

get file size

const fs = require('fs');
const stat = fs.statSync("file path");
console.log(stat.size);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment