java - Difference between SKIP_SIBLINGS and SKIP_SUBTREE -


is aware of difference between these 2 filevisitresult? directly this oracle tutorial:

skip_subtree – when previsitdirectory returns value, specified directory , subdirectories skipped. branch "pruned out" of tree.

skip_siblings – when previsitdirectory returns value, specified directory not visited, postvisitdirectory not invoked, , no further unvisited siblings visited. if returned postvisitdirectory method, no further siblings visited. essentially, nothing further happens in specified directory.

it seems answered own question if explanation on oracle's tutorial didn't clear doubts, javadoc says:

skip_subtree

continue without visiting entries in directory. result meaningful when returned previsitdirectory method; otherwise result type same returning continue.

skip_siblings

continue without visiting siblings of file or directory. if returned previsitdirectory method entries in directory skipped , postvisitdirectory method not invoked.

and here code filevisitresult:

public enum filevisitresult { /**  * continue. when returned {@link filevisitor#previsitdirectory  * previsitdirectory} method entries in directory should  * visited.  */ continue, /**  * terminate.  */ terminate, /**  * continue without visiting entries in directory. result  * meaningful when returned {@link  * filevisitor#previsitdirectory previsitdirectory} method; otherwise  * result type same returning {@link #continue}.  */ skip_subtree, /**  * continue without visiting <em>siblings</em> of file or directory.  * if returned {@link filevisitor#previsitdirectory  * previsitdirectory} method entries in directory  * skipped , {@link filevisitor#postvisitdirectory postvisitdirectory}  * method not invoked.  */ skip_siblings; } 

also here tutorial on enums.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -