Skip to content

Commit ffa8b34

Browse files
author
Gogs
committed
TreeEntry IsLink function
1 parent db125c5 commit ffa8b34

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tree_entry.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ func (te *TreeEntry) IsDir() bool {
7070
return te.mode == ENTRY_MODE_TREE
7171
}
7272

73+
func (te *TreeEntry) IsLink() bool {
74+
return te.mode == ENTRY_MODE_SYMLINK
75+
}
76+
7377
func (te *TreeEntry) Blob() *Blob {
7478
return &Blob{
7579
repo: te.ptree.repo,

0 commit comments

Comments
 (0)