picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

dirTree.l (487B)


      1 # 06may11abu
      2 # (c) Software Lab. Alexander Burger
      3 
      4 (load "@lib/http.l" "@lib/xhtml.l")
      5 
      6 (de subDirs (Dir)
      7    (cache '*DirCache (or (pack (flip (chop Dir))) ".")
      8       (extract
      9          '((F)
     10             (when (=T (car (info (setq F (pack Dir F)))))
     11                (pack F '/) ) )
     12          (dir Dir) ) ) )
     13 
     14 (de dir.html (Path)
     15    (and (app) (setq *DirTree (subDirs)))
     16    (html NIL "Test" NIL NIL
     17       (<tree> "!dir.html" Path *DirTree subDirs nil subDirs) ) )
     18 
     19 (server 8080 "!dir.html")