MCPcopy Create free account
hub / github.com/arktypeio/arktype / lstatIfExists

Function lstatIfExists

ark/type/cli.ts:181–188  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

179}
180
181const lstatIfExists = (path: string): Stats | undefined => {
182 try {
183 return lstatSync(path)
184 } catch (e) {
185 if ((e as NodeJS.ErrnoException).code === "ENOENT") return undefined
186 throw e
187 }
188}
189
190const isWithinDir = (root: string, target: string): boolean => {
191 const rel = relative(root, target)

Callers 4

resolveSafeSkillDirFunction · 0.85
validateSkillTreeFunction · 0.85
copySkillTreeFunction · 0.85
runInitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected