code: public static void eachFile(final Path self, final FileType fileType, @ClosureParams(value = SimpleType.class, options = "java.nio.file.Path") final Closure closure) throws IOException {
          //throws FileNotFoundException, IllegalArgumentException {
          checkDir(self);
  
          // TODO GroovyDoc doesn't parse this file as our java.g doesn't handle this JDK7 syntax
          try (DirectoryStream<Path> stream = Files.newDirectoryStream(self)) {
              for (Path path : stream) {
                  if (fileType == FileType.ANY ||
                          (fileType != FileType.FILES && Files.isDirectory(path)) ||
                          (fileType != FileType.DIRECTORIES && Files.isRegularFile(path))) {
                      closure.call(path);
                  }
              }
          }
      }
docs: Invokes the closure for each 'child' file in this 'parent' folder/directory.
  Both regular files and subfolders/subdirectories can be processed depending
  on the fileType enum value.
  
  @param self     a Path (that happens to be a folder/directory)
  @param fileType if normal files or directories or both should be processed
  @param closure  the closure to invoke
  @throws java.io.FileNotFoundException if the given directory does not exist
  @throws IllegalArgumentException      if the provided Path object does not represent a directory
  @since 2.3.0