feat: add abra dir creation function

This commit is contained in:
decentral1se 2021-07-28 22:10:42 +02:00
parent 1187d6bfd5
commit f7b085dfa2
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 9 additions and 0 deletions

View File

@ -299,3 +299,12 @@ func getAllFoldersInDirectory(directory string) ([]string, error) {
}
return folders, nil
}
func EnsureAbraDirExists() error {
if _, err := os.Stat(ABRA_DIR); os.IsNotExist(err) {
if err := os.Mkdir(ABRA_DIR, 0777); err != nil {
return err
}
}
return nil
}