File: dirTree.l

package info (click to toggle)
picolisp 3.1.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,100 kB
  • sloc: ansic: 14,205; lisp: 795; makefile: 290; sh: 13
file content (19 lines) | stat: -rw-r--r-- 487 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 06may11abu
# (c) Software Lab. Alexander Burger

(load "@lib/http.l" "@lib/xhtml.l")

(de subDirs (Dir)
   (cache '*DirCache (or (pack (flip (chop Dir))) ".")
      (extract
         '((F)
            (when (=T (car (info (setq F (pack Dir F)))))
               (pack F '/) ) )
         (dir Dir) ) ) )

(de dir.html (Path)
   (and (app) (setq *DirTree (subDirs)))
   (html NIL "Test" NIL NIL
      (<tree> "!dir.html" Path *DirTree subDirs nil subDirs) ) )

(server 8080 "!dir.html")