MCPcopy
hub / github.com/slimtoolkit/slim / DirExists

Function DirExists

pkg/util/fsutil/fsutil.go:220–226  ·  view source on GitHub ↗

DirExists returns true if the target exists and it's a directory

(target string)

Source from the content-addressed store, hash-verified

218
219// DirExists returns true if the target exists and it's a directory
220func DirExists(target string) bool {
221 if info, err := os.Stat(target); err == nil && info.IsDir() {
222 return true
223 }
224
225 return false
226}
227
228// IsDir returns true if the target file system object is a directory
229func IsDir(target string) bool {

Callers 11

saveWorkdirMethod · 0.92
saveZoneInfoMethod · 0.92
homeDirsFunction · 0.92
saveSSHClientMethod · 0.92
saveArtifactsMethod · 0.92
ngxEnsureFunction · 0.92
unpackReleaseFunction · 0.92
NewBasicImageBuilderFunction · 0.92
inspectFileFunction · 0.92
SaveImageFunction · 0.92
CopyDirOnlyFunction · 0.85

Calls 1

IsDirMethod · 0.80

Tested by

no test coverage detected