From d97cb0fe5cfa83586aac83e14ca0c944cff50add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Thu, 8 Dec 2016 09:39:43 -0800 Subject: [PATCH] Check if files are a symlink (#20) * rename utlis.go to utils.go * TreeEntry IsLink function --- tree_entry.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tree_entry.go b/tree_entry.go index d3eefee1f..175431673 100644 --- a/tree_entry.go +++ b/tree_entry.go @@ -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{