aboutsummaryrefslogtreecommitdiffstats
path: root/c_ldirs.go
diff options
context:
space:
mode:
Diffstat (limited to 'c_ldirs.go')
-rw-r--r--c_ldirs.go13
1 files changed, 10 insertions, 3 deletions
diff --git a/c_ldirs.go b/c_ldirs.go
index af24c28..ee8977b 100644
--- a/c_ldirs.go
+++ b/c_ldirs.go
@@ -96,16 +96,23 @@ func (ldirs *DirsList) sel(id int) *DirsNode {
}
// returns a string with the full path of the dir
-func (ldirs *DirsList) path(node *DirsNode) string {
+func (dir *DirsNode) path() string {
var path string
- if node == nil {
+ if dir == nil {
return ""
}
- curr := node
+ curr := dir
for curr != nil {
path = curr.Name + "/" + path
curr = curr.Parent
}
return path
}
+
+func (dir *DirsNode) count_hosts() int {
+ if dir.lhost.head == nil {
+ return 0
+ }
+ return dir.lhost.last.ID + 1
+}