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
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

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

Related Questions