code: public static void deleteFilePathOnExit(FilePath filePath) throws IOException, InterruptedException {
          filePath.act(new MasterToSlaveFileCallable<Void>() {
              public Void invoke(File file, VirtualChannel virtualChannel) throws IOException, InterruptedException {
                  file.deleteOnExit();
                  return null;
              }
          });
      }
docs: Deletes a FilePath file on exit.
  
  @param filePath The FilePath to delete on exit.
  @throws IOException In case of a missing file.