Skip to content
This repository has been archived by the owner on Apr 12, 2019. It is now read-only.

Check if files are a symlink (#20) #20

Merged
merged 1 commit into from
Dec 22, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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