open-nomad/nomad/util.go
2015-06-01 17:49:10 +02:00

15 lines
222 B
Go

package nomad
import (
"os"
"path/filepath"
)
// ensurePath is used to make sure a path exists
func ensurePath(path string, dir bool) error {
if !dir {
path = filepath.Dir(path)
}
return os.MkdirAll(path, 0755)
}