Permalink
Browse files

GROOVY-3972: Groovy supports eachFile, eachFileRecurse and eachFileMa…

…tch operations for FilesAndDirectories and DirectoriesOnly but not FilesOnly

git-svn-id: http://svn.codehaus.org/groovy/trunk/groovy/groovy-core@18954 a5544e8c-8a19-0410-ba12-f9af4593a198
  • Loading branch information...
1 parent e8c85d7 commit 6a2bb2afb33ebf2859b9463eb04324e5ab97d081 @paulk-asert paulk-asert committed Jan 9, 2010
@@ -19,5 +19,10 @@
* Represents particular files of interest.
*/
public enum FileType {
- FilesOnly, DirectoriesOnly, FilesAndDirectories
+ /** Represents normal files */
+ FILES,
+ /** Represents directories */
+ DIRECTORIES,
+ /** Represents both normal files and directories */
+ ANY
}
@@ -16,8 +16,17 @@
package groovy.io;
/**
- * Represents special return properties for preDir and postDir closures used with DGM#traverse(File, Map, Closure).
+ * Represents special return values for the 'preDir', 'postDir' and 'visit'/supplied Closures used with
+ * {@link org.codehaus.groovy.runtime.DefaultGroovyMethods#traverse(java.io.File, java.util.Map, groovy.lang.Closure)}
+ * and related methods to control subsequent traversal behavior.
*/
public enum FileVisitResult {
- CONTINUE, SKIP_SIBLINGS, SKIP_SUBTREE, TERMINATE
+ /** Continue processing; the default */
+ CONTINUE,
+ /** Skip processing sibling files/directories within the current directory being processed */
+ SKIP_SIBLINGS,
+ /** Do not process the child files/subdirectories within the current directory being processed */
+ SKIP_SUBTREE,
+ /** Do not process any more files */
+ TERMINATE
}
Oops, something went wrong.

0 comments on commit 6a2bb2a

Please sign in to comment.