summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/shell.go b/shell.go
index 7670329..8724a34 100644
--- a/shell.go
+++ b/shell.go
@@ -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()
+}