github.com/aergoio/aergo@v1.3.1/internal/common/path.go (about) 1 package common 2 3 import ( 4 "os" 5 "path" 6 ) 7 8 // PathMkdirAll make a path by joining paths and create directory if not exists 9 func PathMkdirAll(paths ...string) string { 10 target := path.Join(paths...) 11 if _, err := os.Stat(target); os.IsNotExist(err) { 12 _ = os.MkdirAll(target, 0711) 13 } 14 return target 15 }