MCPcopy Create free account
hub / github.com/Noumena-Network/code / getFileMtime

Function getFileMtime

src/utils/commitAttribution.ts:328–337  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

326 * entering a sync setAppState callback.
327 */
328export async function getFileMtime(filePath: string): Promise<number> {
329 const normalizedPath = normalizeFilePath(filePath)
330 const absPath = expandFilePath(normalizedPath)
331 try {
332 const stats = await stat(absPath)
333 return stats.mtimeMs
334 } catch {
335 return Date.now()
336 }
337}
338
339/**
340 * Track a file modification by NCode.

Callers

nothing calls this directly

Calls 3

normalizeFilePathFunction · 0.85
expandFilePathFunction · 0.85
statFunction · 0.85

Tested by

no test coverage detected