DirExists returns true if the given path exists and is a directory in the repository worktree.
(filename string)
| 31 | // DirExists returns true if the given path exists and is a directory in the |
| 32 | // repository worktree. |
| 33 | func (r *Repository) DirExists(filename string) bool { |
| 34 | stat, err := r.WorktreeFS.Stat(filename) |
| 35 | if err != nil { |
| 36 | return false |
| 37 | } |
| 38 | |
| 39 | return stat.Mode().IsDir() |
| 40 | } |
| 41 | |
| 42 | // CreateFile is a convenience method to set the contents of a file in the |
| 43 | // repo and stage it. |
nothing calls this directly
no outgoing calls
no test coverage detected