[Zope] LocalFS and PathHandler

Dieter Maurer dieter@handshake.de
Mon, 22 Jan 2001 19:54:11 +0100 (CET)


Ulrich Wisser writes:
 > How can a get a directory listining with LocalFS
 > for path "/sub1/sub2/sub3/"? I know I need something
 > like "lfs['sub1']['sub2']['sub3'].fileids". But
 > what if there are more (or less) elements in path_to_handle?
The easiest answer to these types of questions are
recursive functions.

You may use a "dtml-in", too. Like that:

    <dtml-call "REQUEST.set(curr__,lfs)">
    <dtml-in path_to_handle>
      <dtml-call "REQUEST.set(curr__,curr__[_['sequence-item']])">
    </dtml-in>
    <dtml-var "curr__.fileids">



Dieter