code: public FilePath createTextTempFile(final String prefix, final String suffix, final String contents, final boolean inThisDirectory) throws IOException, InterruptedException {
          try {
              return new FilePath(channel, act(new CreateTextTempFile(inThisDirectory, prefix, suffix, contents)));
          } catch (IOException e) {
              throw new IOException("Failed to create a temp file on "+remote,e);
          }
      }
docs: Creates a temporary file in this directory (or the system temporary
  directory) and set the contents to the given text (encoded in the
  platform default encoding)
  
  @param prefix
  The prefix string to be used in generating the file's name; must be
  at least three characters long
  @param suffix
  The suffix string to be used in generating the file's name; may be
  null, in which case the suffix ".tmp" will be used
  @param contents
  The initial contents of the temporary file.
  @param inThisDirectory
  If true, then create this temporary in the directory pointed to by
  this.
  If false, then the temporary file is created in the system temporary
  directory (java.io.tmpdir)
  @return
  The new FilePath pointing to the temporary file
  @see File#createTempFile(String, String)