Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Depth Listing in Directory Traversal (one more stack)

by tye (Sage)
on Jul 20, 2004 at 06:36 UTC ( #375832=note: print w/ replies, xml ) Need Help??

in reply to Depth Listing in Directory Traversal

Where you  push @{ $self->{dirs} },... you need to add push @{ $self->{levels} }, 1+$self->{level};. When you shift off of $self->{dirs}, also do $self->{level} = shift @{ $self->{levels} };.

You can do it in more memory-efficient ways but the added complexity seems not worth it.

- tye        

Comment on Re: Depth Listing in Directory Traversal (one more stack)
Select or Download Code
Replies are listed 'Best First'.
Re^2: Depth Listing in Directory Traversal (one more stack)
by crabbdean (Pilgrim) on Jul 20, 2004 at 13:16 UTC
    tye you are great. :-) Love your work! ++ That worked a treat.

    You know I was part way there in that thinking process, had similar thoughts but hadn't connected the pieces. Appreciate the help.

    Thanks also to hbo that idea would have worked also but I felt this was cleaner.

    The Funkster of Mirth
    Programming these days takes more than a lone avenger with a compiler. - sam
    RFC1149: A Standard for the Transmission of IP Datagrams on Avian Carriers

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://375832]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2016-02-10 11:06 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (343 votes), past polls