MCPcopy
hub / github.com/vitejs/vite / tryStatSync

Function tryStatSync

packages/vite/src/node/utils.ts:400–407  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

398}
399
400export function tryStatSync(file: string): fs.Stats | undefined {
401 try {
402 // The "throwIfNoEntry" is a performance optimization for cases where the file does not exist
403 return fs.statSync(file, { throwIfNoEntry: false })
404 } catch {
405 // Ignore errors
406 }
407}
408
409export function lookupFile(
410 dir: string,

Callers 11

findNearestPackageDataFunction · 0.90
findNearestNodeModulesFunction · 0.90
loadEnvFunction · 0.90
checkPublicFileFunction · 0.90
tryResolveRealFileFunction · 0.90
tryResolveRealFileOrTypeFunction · 0.90
isDirectoryFunction · 0.90
handlerFunction · 0.90
getLockfileHashFunction · 0.90
lookupFileFunction · 0.85
isFileReadableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected