INNER CODE UNIT · TypeScript

statSignature

modem-dev/hunk · packages/hunk-git/src/index.ts:107

export function statSignature(path: string) {
  if (!fs.existsSync(path)) {
    return `${path}:missing`;
  }

  const stat = fs.statSync(path);
  return `${path}:${stat.size}:${stat.mtimeMs}:${stat.ino}`;
}

/* -------------------------------------------------------------------------- */
/* Exact file sources                                                          */
/* -------------------------------------------------------------------------- */

/** Exact source reader plus a stable identity for its complete old/new snapshot. */
interface GitSourceCapability {
  readFileSource: ExtensionVcsFileSourceReader;
  sourceCacheKey: string;
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…