I would like to useJava 7's FileVisitor to walk up a tree

Posted by John Ormerod on Stack Overflow See other posts from Stack Overflow or by John Ormerod
Published on 2013-11-05T14:25:54Z Indexed on 2013/11/05 15:53 UTC
Read the original article Hit count: 263

Filed under:
|

I have looked and searched for some guidance on how to start at a low point in a path and walk up (or 'back'), until I find a folder with the name I am searching for. The FileVisitor class looks like it ought to be able to help me, but it only seems to work from head to toe.

Is there something that someone could point me to?

Thanks, John

{edited: I seem to be discouraged from saying thanks to the two people who replied in a comment. So thanks! I had a 'duh!' moment when I saw the simple approach. And the article looks useful to someone starting to use FileVisitor. Put them together, and I could go up and then down, if I needed to. John]

© Stack Overflow or respective owner

Related posts about java

Related posts about filevisitor