kotlin.io.createTempDir

createTempDir

fun createTempDir(
    prefix: String = "tmp", 
    suffix: String? = null, 
    directory: File? = null
): File

Platform and version requirements: JVM

Creates an empty directory in the specified directory, using the given prefix and suffix to generate its name.

If prefix is not specified then some unspecified name will be used. If suffix is not specified then ".tmp" will be used. If directory is not specified then the default temporary-file directory will be used.

Exceptions

IOException - in case of input/output error.

IllegalArgumentException - if prefix is shorter than three symbols.

Return a file object corresponding to a newly-created directory.

© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.io/create-temp-dir.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部