Creates a temporary file.
Creates a temporary file. You can optionally provide a dir
to specify where
this file lives, file-prefix
and file-suffix
to customize what it looks
like, and a PermSet to customize its filesystem permissions.
Passing in a os.Source will initialize the contents of that file to the provided data; otherwise it is created empty.
By default, temporary files are deleted on JVM exit. You can disable that
behavior by setting deleteOnExit = false
Creates a temporary directory.
Creates a temporary directory. You can optionally provide a dir
to specify
where this file lives, a prefix
to customize what it looks like, and a
PermSet to customize its filesystem permissions.
By default, temporary directories are deleted on JVM exit. You can disable that
behavior by setting deleteOnExit = false
(Since version ) see corresponding Javadoc for more information.
Alias for
java.nio.file.Files.createTempFile
andjava.io.File.deleteOnExit
. Pass indeleteOnExit = false
if you want the temp file to stick around.