Get the file size of a file
npm install --save file-bytes const fileBytes = require('file-bytes'); fileBytes('README.md').then(size => { console.log(`README.md is ${size} bytes`); }); //=> 'README.md is 1806 bytes' // sync console.log(`README.md is ${fileBytes.sync('README.md')} bytes`); //=> 'README.md is 1806 bytes'Returns a promise for the filename's file size as a number.
Return's the filename's file size as a number.
Type: string
MIT © Dawson Botsford