continue working on config and default parsing

This commit is contained in:
Daniel Fichtinger 2024-11-25 16:05:35 -05:00
parent 4d1b18fd12
commit c6c801e248
8 changed files with 183 additions and 109 deletions

View file

@ -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