blob: 65c28f795671d91d46dc97bb37591e960e5912d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
package ca.allanwang.kau.utils
import android.os.Bundle
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) } }
|