English Idiom in Unix: Directory Recursively

Chris Angelico rosuav at gmail.com
Wed May 18 14:12:49 EDT 2011


On Thu, May 19, 2011 at 2:16 AM, Thomas A. Russ <tar at sevak.isi.edu> wrote:
> Well, unless you have a tree with backpointers, you have to keep the
> entire parent chain of nodes visited.  Otherwise, you won't be able to
> find the parent node when you need to backtrack.  A standard tree
> representation has only directional links.

Sure, but there are plenty of trees that do have parent pointers.
Widgets on every system I've tinkered with always have, and in a
directory structure that doesn't allow files to be in multiple places,
it's not hard (look at the . and .. entries in a directory). Of
course, file systems are not idealized tree structures, so things will
be a bit more complicated.

ChrisA



More information about the Python-list mailing list