blob: b97f4aa6fab39a8396ece62f9b83b6c44fc5a5ff (
plain)
1
2
3
4
5
6
7
8
9
10
|
package ca.allanwang.kau.utils
import java.io.File
import java.io.InputStream
/**
* Created by Allan Wang on 2017-08-04.
*/
fun File.copyFromInputStream(inputStream: InputStream)
= inputStream.use { input -> outputStream().use { output -> input.copyTo(output) } }
|