public static Path createTempFileInSameDir(String fileName) throws IOException {
  Path target=Paths.get(fileName);
  Path parentPath=target.getParent();
  return DefaultFilepaths.createTempFile(parentPath,null,null);
}

public static Path createTempFileInSameDir ( String fileName ) throws IOException { Path target = Paths . get ( fileName ) ; Path parentPath = target . getParent ( ) ; return DefaultFilepaths . createTempFile ( parentPath , null , null ) ; }
convenience method which creates a temporary file on disk and returns its path . the new file is created in the same directory as the file whose path is given as parameter
