MCPcopy Create free account
hub / github.com/astercloud/aster / EnsureDir

Function EnsureDir

pkg/config/paths.go:149–151  ·  view source on GitHub ↗

EnsureDir creates a directory if it doesn't exist.

(path string)

Source from the content-addressed store, hash-verified

147
148// EnsureDir creates a directory if it doesn't exist.
149func EnsureDir(path string) error {
150 return os.MkdirAll(path, 0755)
151}
152
153// EnsureAllDirs creates all necessary directories.
154func EnsureAllDirs() error {

Callers 3

demonstrateEnsureDirFunction · 0.92
EnsureAllDirsFunction · 0.85
TestEnsureDirFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestEnsureDirFunction · 0.68