MCPcopy
hub / github.com/esm-dev/esm.sh / existsFile

Function existsFile

server/utils.go:93–96  ·  view source on GitHub ↗

existsFile returns true if the given path is a file.

(filepath string)

Source from the content-addressed store, hash-verified

91
92// existsFile returns true if the given path is a file.
93func existsFile(filepath string) bool {
94 fi, err := os.Lstat(filepath)
95 return err == nil && !fi.IsDir()
96}
97
98// ensureDir creates a directory if it does not exist.
99func ensureDir(dir string) (err error) {

Callers 15

transformSvelteFunction · 0.85
transformVueFunction · 0.85
StartFunction · 0.85
esmRouterFunction · 0.85
rewriteJSMethod · 0.85
TestGhInstallFunction · 0.85
buildUnenvNodeRuntimeFunction · 0.85
cjsModuleLexerFunction · 0.85
resolveBuildArgsFunction · 0.85
walkDepsFunction · 0.85
buildModuleMethod · 0.85

Calls

no outgoing calls

Tested by 2

TestGhInstallFunction · 0.68