code: public static <T> T splitEachLine(File self, String regex, @ClosureParams(value=SimpleType.class, options="java.lang.String[]") Closure<T> closure) throws IOException {
          return IOGroovyMethods.splitEachLine(newReader(self), regex, closure);
      }
docs: Iterates through this file line by line, splitting each line using
  the given regex separator. For each line, the given closure is called with
  a single parameter being the list of strings computed by splitting the line
  around matches of the given regular expression.
  Finally the resources used for processing the file are closed.
  
  @param self    a File
  @param regex   the delimiting regular expression
  @param closure a closure
  @return the last value returned by the closure
  @throws IOException if an IOException occurs.
  @throws java.util.regex.PatternSyntaxException
  if the regular expression's syntax is invalid
  @see IOGroovyMethods#splitEachLine(java.io.Reader, java.lang.String, groovy.lang.Closure)
  @since 1.5.5