datasource.fileSize
Returns the size of a file.
js
datasource.fileSize(fileName)Parameters
| Parameter | Type | Description |
|---|---|---|
fileName | string | The path of the file. |
Returns
numberThe file's size in bytes, or 0 when the file doesn't exist or the path is invalid.
Examples
js
const bytes = datasource.fileSize("my_file.txt");