Stream and process module zips

This commit is contained in:
topjohnwu
2019-07-20 21:04:06 -07:00
parent 746a1d8d59
commit 8ca188f4d4
13 changed files with 99 additions and 270 deletions
@@ -95,10 +95,12 @@ fun File.provide(context: Context = get()): Uri {
}
fun File.mv(destination: File) {
inputStream().copyTo(destination)
inputStream().writeTo(destination)
deleteRecursively()
}
fun String.toFile() = File(this)
fun Intent.chooser(title: String = "Pick an app") = Intent.createChooser(this, title)
fun Intent.chooser(title: String = "Pick an app") = Intent.createChooser(this, title)
fun Context.cachedFile(name: String) = File(cacheDir, name)