The third paragraph of the documentation of java.nio.file.Files.createTempFile(Path,String,String,FileAttribute) is:
"As with the File.createTempFile methods, this method is only part of a temporary-file facility. Where used as a work files, the resulting file may be opened using the DELETE_ON_CLOSE option so that the file is deleted when the appropriate close method is invoked. Alternatively, a shutdown-hook, or the File.deleteOnExit() mechanism may be used to delete the file automatically. "
The first and second sentences are awkward and should be rephrased. In particular, the statement about "temporary-file facility" seems redundant, and "as a works file" incorrect.
"As with the File.createTempFile methods, this method is only part of a temporary-file facility. Where used as a work files, the resulting file may be opened using the DELETE_ON_CLOSE option so that the file is deleted when the appropriate close method is invoked. Alternatively, a shutdown-hook, or the File.deleteOnExit() mechanism may be used to delete the file automatically. "
The first and second sentences are awkward and should be rephrased. In particular, the statement about "temporary-file facility" seems redundant, and "as a works file" incorrect.
- relates to
-
JDK-8280366 (fs) Restore Files.createTempFile javadoc
- Resolved