aboutsummaryrefslogtreecommitdiffstats
path: root/c_ldirs.go
diff options
context:
space:
mode:
Diffstat (limited to 'c_ldirs.go')
-rw-r--r--c_ldirs.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/c_ldirs.go b/c_ldirs.go
index de081b6..d7a98a1 100644
--- a/c_ldirs.go
+++ b/c_ldirs.go
@@ -154,6 +154,14 @@ func (dir *DirsNode) count_hosts() int {
return dir.lhost.last.ID + 1
}
+func (ldirs *DirsList) prev(dir *DirsNode) *DirsNode {
+ for ptr := ldirs.head; ptr != nil; ptr = ptr.next {
+ if ptr.next == dir {
+ return ptr
+ }
+ }
+ return nil
+}
// return the number of hosts and subfolders of the dir
// func (item *ItemsNode) count_elements(skip_folds bool,
// folds map[*DirsNode]*ItemsList) (*ItemsNode, int) {