createTempDirectory
fun createTempDirectory( prefix: String? = null, vararg attributes: FileAttribute<*> ): Path
Creates a new directory in the default temp directory, using the given prefix to generate its name.
Parameters
attributes
- an optional list of file attributes to set atomically when creating the directory.
Exceptions
UnsupportedOperationException
- if the array contains an attribute that cannot be set atomically when creating the directory.
Return the path to the newly created directory that did not exist before.
See Also
fun createTempDirectory( directory: Path?, prefix: String? = null, vararg attributes: FileAttribute<*> ): Path
Creates a new directory in the specified directory, using the given prefix to generate its name.
Parameters
directory
- the parent directory in which to create a new directory. It can be null
, in that case the new directory is created in the default temp directory.
attributes
- an optional list of file attributes to set atomically when creating the directory.
Exceptions
UnsupportedOperationException
- if the array contains an attribute that cannot be set atomically when creating the directory.
Return the path to the newly created directory that did not exist before.
See Also
© 2010–2021 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.io.path/create-temp-directory.html