Hi Alex,

Thanks! With this little script in my doc/default file ...

(html NIL "-index-" "@lib.css" NIL
        (<h1> NIL (<ul> NIL (for X (dir) (<li> NIL X)))) )

.. I get a listing of files/folders in my main picoLisp folder. How do I
get a listing of what's in the doc/ folder where this default file is?

/Jon

> Hi Jon,
>
>> to limit the access. However, it could have been nice to have some
>> 'index' function that could list all the files in the doc/ folder if
>> the user's request was for "doc/", instead of giving a 404 as is the
>> case now. Do I have to modify the lib/http.l file to achieve this?
>
> No. There is a hook for that.
>
> Just place a file named "default" into that directory. This is executed
> automatically (via 'script'). So you could call 'dir' there, filter out
> "default" itself, and display the results.
>
> An example of how to display a directory tree in HTML can be found
> in "misc/dirTree.l" in the PicoLisp distribution.
>
> ?? Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to