code: public static <T> T withWriter(Path self, String charset, @ClosureParams(value = SimpleType.class, options = "java.io.Writer") Closure<T> closure) throws IOException {
          return withWriter(self, charset, false, closure);
      }
docs: Creates a new BufferedWriter for this file, passes it to the closure, and
  ensures the stream is flushed and closed after the closure returns.
  The writer will use the given charset encoding, but will not write a BOM.
  
  @param self    a Path
  @param charset the charset used
  @param closure a closure
  @return the value returned by the closure
  @throws java.io.IOException if an IOException occurs.
  @since 2.3.0