Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

When recursively descending a directory tree, how does one avoid an infinite loop in the case that a directory entry is actually a symbolic link to a directory higher up in the tree?

0
10 Posted

When recursively descending a directory tree, how does one avoid an infinite loop in the case that a directory entry is actually a symbolic link to a directory higher up in the tree?

0
10

listFiles() method for File objects to list the files in a directory, and then isDirectory() to determine whether I need to recurse.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123