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

Commit d97cb0f

Browse files
gronkelunny
authored andcommitted
Check if files are a symlink (#20)
* rename utlis.go to utils.go * TreeEntry IsLink function
1 parent 06ee0cf commit d97cb0f

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)