File: index.cgi.bak

package info (click to toggle)
newlisp 10.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,460 kB
  • ctags: 4,357
  • sloc: ansic: 33,202; lisp: 7,369; java: 7,012; sh: 647; makefile: 273
file content (14 lines) | stat: -rwxr-xr-x 509 bytes parent folder | download | duplicates (28)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env newlisp

(print  "Content-type: text/html\r\n\r\n")
(println "<h2>" (real-path) "</h2>")

(println {<table>})
(dolist (file (sort (directory)))
    (set 'slash (if (directory? file) "/" ""))
    (println {<tr><td><tt><a href="http:} file slash {">} file  slash {</a>&nbsp;&nbsp;</tt></td><td><tt>}
        (date (last (file-info file)) 0 "%Y-%m-%d %H:%M:%S") {</tt></td>} 
        {<td><pre>} (format "%12.3f KB" (div (file-info file 0) 1000)) {</pre></td></tr>}))
(println {</table>})
(exit)