continue working on config and default parsing
This commit is contained in:
parent
4d1b18fd12
commit
c6c801e248
8 changed files with 183 additions and 109 deletions
|
@ -40,6 +40,13 @@ func ReplaceRoot(inPath, outRoot string) string {
|
|||
return outPath
|
||||
}
|
||||
|
||||
// FileExists returns a boolean indicating
|
||||
// whether something exists at the path.
|
||||
func FileExists(path string) bool {
|
||||
_, err := os.Stat(path)
|
||||
return !os.IsNotExist(err)
|
||||
}
|
||||
|
||||
func CreateParents(path string) error {
|
||||
dir := filepath.Dir(path)
|
||||
// Check if the parent directory already exists
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue