Skip to content

Commit

Permalink
Check if files are a symlink (#20)
Browse files Browse the repository at this point in the history
* rename utlis.go to utils.go

* TreeEntry IsLink function
  • Loading branch information
gronke authored and lunny committed Dec 22, 2016
1 parent 06ee0cf commit d97cb0f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tree_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ func (te *TreeEntry) IsDir() bool {
return te.mode == EntryModeTree
}

// IsLink if the entry is a symlink
func (te *TreeEntry) IsLink() bool {
return te.mode == EntryModeSymlink
}

// Blob retrun the blob object the entry
func (te *TreeEntry) Blob() *Blob {
return &Blob{
Expand Down

0 comments on commit d97cb0f

Please sign in to comment.