From 5df79c53745fde5d6c3340a2979b1429cd5892c1 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Sat, 8 Oct 2011 20:30:28 +0200 Subject: Initial import of htcd system 1.0 Signed-off-by: Henrik Rydberg --- htc/tree.htc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 htc/tree.htc (limited to 'htc/tree.htc') diff --git a/htc/tree.htc b/htc/tree.htc new file mode 100644 index 0000000..8615108 --- /dev/null +++ b/htc/tree.htc @@ -0,0 +1,21 @@ +\const{HTCEXT}{htc htx html} +\const{SKIPDIR}{sys htc SCCS} +\def{tree.update}{}{ + [xmod:=\now]; + \ldef{trav}{x}{ + \staturi{\1}{ + \if(count stat.ALIAS)(@<-stat.); + \forall{it}{\dirent{\1}}{ + \if(\dirmod(it)&24576){ + \nif(\SKIPDIR which (it past \1)){\trav{[it]/}} + }{ + \if(\HTCEXT which (it rpast ".")){ + \staturi(it){\if(count stat.ALIAS)(@<-stat.)} + } + } + } + } + }; + \db{TREE}{\trav{/}\query(XMOD