MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / sig_stat_mtime_ns

Function sig_stat_mtime_ns

src/watcher/watcher.c:500–508  ·  view source on GitHub ↗

Platform-portable mtime_ns (mirrors pipeline_incremental.c). */

Source from the content-addressed store, hash-verified

498
499/* Platform-portable mtime_ns (mirrors pipeline_incremental.c). */
500static int64_t sig_stat_mtime_ns(const struct stat *st) {
501#ifdef __APPLE__
502 return ((int64_t)st->st_mtimespec.tv_sec * NS_PER_SEC) + (int64_t)st->st_mtimespec.tv_nsec;
503#elif defined(_WIN32)
504 return (int64_t)st->st_mtime * NS_PER_SEC;
505#else
506 return ((int64_t)st->st_mtim.tv_sec * NS_PER_SEC) + (int64_t)st->st_mtim.tv_nsec;
507#endif
508}
509
510/* Fold a listed path's (size, mtime) into the signature so an in-place edit
511 * of an already-dirty file still produces a new signature. A failed stat

Callers 1

sig_fold_path_statFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected