8280366: (fs) Restore Files.createTempFile javadoc

Reviewed-by: alanb, lancea
This commit is contained in:
Brian Burkhalter 2022-01-27 21:00:45 +00:00
parent b94ebaa09c
commit ece89c6df1

View file

@ -823,11 +823,12 @@ public final class Files {
* names in the same manner as the {@link * names in the same manner as the {@link
* java.io.File#createTempFile(String,String,File)} method. * java.io.File#createTempFile(String,String,File)} method.
* *
* <p> The file may be opened using the {@link * <p> As with the {@code File.createTempFile} methods, this method is only
* part of a temporary-file facility. Where used as a <em>work file</em>,
* the resulting file may be opened using the {@link
* StandardOpenOption#DELETE_ON_CLOSE DELETE_ON_CLOSE} option so that the * StandardOpenOption#DELETE_ON_CLOSE DELETE_ON_CLOSE} option so that the
* file is deleted when the appropriate {@code close} method is invoked * file is deleted when the appropriate {@code close} method is invoked.
* either explicitly or via a try-with-resources statement. Alternatively, * Alternatively, a {@link Runtime#addShutdownHook shutdown-hook}, or the
* a {@link Runtime#addShutdownHook shutdown-hook}, or the
* {@link java.io.File#deleteOnExit} mechanism may be used to delete the * {@link java.io.File#deleteOnExit} mechanism may be used to delete the
* file automatically. * file automatically.
* *