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

Commit 43c086d

Browse files
authored
Merge pull request #20 from lunny/lunny/islink_for_treeentry
Check if files are a symlink (#20)
2 parents 06ee0cf + d97cb0f commit 43c086d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tree_entry.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ func (te *TreeEntry) IsDir() bool {
8181
return te.mode == EntryModeTree
8282
}
8383

84+
// IsLink if the entry is a symlink
85+
func (te *TreeEntry) IsLink() bool {
86+
return te.mode == EntryModeSymlink
87+
}
88+
8489
// Blob retrun the blob object the entry
8590
func (te *TreeEntry) Blob() *Blob {
8691
return &Blob{

0 commit comments

Comments
 (0)