有没有办法在 bookdown 中包含文件的最后更新时间?

Is there a way to include when a file was last updated in bookdown?

我有一本记事本,我想在每一页上包含源 .Rmd 文件的最后一个日期 updated/modified。

我知道可以使用 Sys.Date() 获得 when the file was compiled,但我不确定如何从文件属性中获得它。

file.info("filepath/filename.Rmd")$mtime