Skip to content

datasource.fileLastModified ​

Returns when a file was last changed.

js
datasource.fileLastModified(fileName)

Parameters ​

ParameterTypeDescription
fileNamestringThe path of the file.

Returns ​

number

Milliseconds since 1 January 1970 (UTC), or 0 when the file doesn't exist or the path is invalid.

Examples ​

js
const lastModified = new Date(datasource.fileLastModified("my_file.txt"));