$fileSize
$fileSize
will return the size of a given file.
Usage
Parameters
Field | Type | Description | Required |
---|---|---|---|
path | string | File path. | true |
unit? | string | In which unit the size will be returned in. 1. B (byte / default) 2. KB (kiloByte) 3. MB (megaByte) 4. GB (gigaByte) 5. b (bit) 6. kb (kiloBit) 7. mb (megaBit) 8. GB (gigaBit) | false |
Example(s)
This will return the size of your index.js
in GB
: