in reply to Re^2: Depth Listing in Directory Traversal
in thread Depth Listing in Directory Traversal
The "width first" traversal of the directory tree doesn't matter in the code I gave. The path seperator count will be the same between peer directories, thus their difference will be zero, and we will add zero to the depth counter. This also works for transitions up the stack, since that difference will be negative.
|
---|