add IsDirectory() check

This commit is contained in:
Jeff Carr 2024-12-01 11:44:20 -06:00
parent 8e9ec30b29
commit f24d8131c3
1 changed files with 8 additions and 0 deletions

View File

@ -60,3 +60,11 @@ func (repo *Repo) Exists(filename string) bool {
}
return true
}
func (repo *Repo) IsDirectory() bool {
info, err := os.Stat(repo.FullPath)
if err != nil {
return false
}
return info.IsDir()
}