MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / waitForFile

Function waitForFile

tooling/scripts/perf-desktop-runtime.mjs:102–110  ·  view source on GitHub ↗
(path, timeoutMs)

Source from the content-addressed store, hash-verified

100}
101
102async function waitForFile(path, timeoutMs) {
103 const startedAt = performance.now()
104 const deadline = startedAt + timeoutMs
105 while (performance.now() < deadline) {
106 if (await fileExists(path)) return round(performance.now() - startedAt)
107 await sleep(50)
108 }
109 return null
110}
111
112function packagedAppExecutablePath(appPath) {
113 if (process.platform === 'darwin' && appPath.endsWith('.app')) {

Callers 1

mainFunction · 0.70

Calls 3

fileExistsFunction · 0.70
roundFunction · 0.70
sleepFunction · 0.70

Tested by

no test coverage detected