MCPcopy Create free account
hub / github.com/alibaba/open-code-review / touchTimestamp

Function touchTimestamp

scripts/update.js:24–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22const DEFAULT_REGISTRY = "https://registry.npmjs.org";
23
24function touchTimestamp() {
25 fs.mkdirSync(stateDir, { recursive: true });
26 const now = new Date();
27 try {
28 fs.utimesSync(tsFile, now, now);
29 } catch (_) {
30 fs.writeFileSync(tsFile, now.toISOString());
31 }
32}
33
34function acquireLock() {
35 fs.mkdirSync(stateDir, { recursive: true });

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected