Given a partial directory tree:
dir x - | ..........| - dir y ..........| - file a
In what order can the following methods be called if walking the directory tree from x?
Choose all that apply.
I: preVisitDirectory x II: preVisitDirectory x/y III: postVisitDirectory x/y IV: postVisitDirectory x V: visitFile x/a
B and C are correct because file visitor does a depth-first search.
When files and directories are at the same level of the file tree, they can be visited in either order.
Therefore, "y" and "a" could be reversed.
All of the subdirectories and files are visited before postVisit
is called on the directory.