From 6f866cf8feb9d5c7707e337c6edb2335c1fa16d8 Mon Sep 17 00:00:00 2001 From: Joe Date: Tue, 9 Jan 2024 20:20:20 +0100 Subject: folding visually --- c_ldirs.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'c_ldirs.go') diff --git a/c_ldirs.go b/c_ldirs.go index 64c9a4e..b32db51 100644 --- a/c_ldirs.go +++ b/c_ldirs.go @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/c_ldirs.go - * Mon Jan 08 17:44:15 2024 + * Tue Jan 09 12:06:44 2024 * Joe * * the directories linked list @@ -116,3 +116,12 @@ func (dir *DirsNode) count_hosts() int { } return dir.lhost.last.ID + 1 } + +func (dir *DirsNode) folded_parents() bool { + for ptr := dir.Parent; ptr.Parent != nil; ptr = ptr.Parent { + if ptr.Folded == true { + return true + } + } + return false +} -- cgit v1.2.3