public static Path createTempFile(Path tempDirPath,String prefix,String suffix) throws IOException {
  if (!Files.exists(tempDirPath)) {
    Files.createDirectory(tempDirPath);
  }
  return Files.createTempFile(tempDirPath,prefix,suffix,permissions);
}

public static Path createTempFile ( Path tempDirPath , String prefix , String suffix ) throws IOException { if ( ! Files . exists ( tempDirPath ) ) { Files . createDirectory ( tempDirPath ) ; } return Files . createTempFile ( tempDirPath , prefix , suffix , permissions ) ; }
creates a temporary file in the specified location . also creates the location if it does not exist .
