Skip to content

Commit

Permalink
Add File.Executable
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Dec 3, 2018
1 parent 66c2461 commit f1832ca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/chezmoi/chezmoi.go
Expand Up @@ -264,6 +264,11 @@ func (f *File) Contents() ([]byte, error) {
return f.contents, f.contentsErr
}

// Executable returns true is f is executable.
func (f *File) Executable() bool {
return f.Perm&0111 != 0
}

// Private returns true if f is private.
func (f *File) Private() bool {
return f.Perm&os.ModePerm&077 == 0
Expand Down

0 comments on commit f1832ca

Please sign in to comment.