MCPcopy Create free account
hub / github.com/observablehq/framework / stat

Method stat

test/deploy-test.ts:131–145  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

129 }
130
131 async stat(path: string) {
132 function overrideTime(s: Stats, date: Date) {
133 for (const key of ["a", "c", "m", "birth"] as const) {
134 s[`${key}time`] = date;
135 s[`${key}timeMs`] = date.getTime();
136 }
137 }
138 const s = await stat(path);
139 if (path.startsWith("test/input/") && this.fixedInputStatTime) {
140 overrideTime(s, this.fixedInputStatTime);
141 } else if (path.startsWith("test/output/") && this.fixedOutputStatTime) {
142 overrideTime(s, this.fixedOutputStatTime);
143 }
144 return s;
145 }
146
147 async build(): Promise<void> {
148 // Don't actually build.

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected