stampOf
uses node:fs
When a file was last replaced or written, to notice a new version: its inode and time, or undefined if it's gone.
import fs from "node:fs"; export function stampOf(file: string): string | undefined { try { const st = fs.statSync(file); return `${st.ino}:${st.mtimeMs}`; } catch { return undefined; } }