Improve docs for createTempDir/createTempFile

#KT-35218
This commit is contained in:
Valeriy.Vyrva
2019-12-02 13:53:11 +03:00
committed by Ilya Gorbunov
parent 4fe6880489
commit 30ff886754
2 changed files with 16 additions and 6 deletions
@@ -14,10 +14,15 @@ import java.io.IOException
/**
* 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 [prefix] is not specified then some unspecified string 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.
*
* The [prefix] argument, if specified, must be at least three characters long.
* It is recommended that the prefix be a short, meaningful string such as "job" or "mail".
*
* To create the new file, the [prefix] and the [suffix] may first be adjusted to fit the limitations of the underlying platform.
*
* @return a file object corresponding to a newly-created directory.
*
* @throws IOException in case of input/output error.
@@ -36,10 +41,15 @@ public fun createTempDir(prefix: String = "tmp", suffix: String? = null, directo
/**
* Creates a new empty file 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 [prefix] is not specified then some unspecified string 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.
*
* The [prefix] argument, if specified, must be at least three characters long.
* It is recommended that the prefix be a short, meaningful string such as "job" or "mail".
*
* To create the new file, the [prefix] and the [suffix] may first be adjusted to fit the limitations of the underlying platform.
*
* @return a file object corresponding to a newly-created file.
*
* @throws IOException in case of input/output error.