Truncate existing file when openOutputStream

This commit is contained in:
vvb2060 2020-10-06 01:31:13 +08:00 committed by John Wu
parent 67f8dc494e
commit bacb5fa462
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ object MediaStoreUtils {
fun Uri.inputStream() = cr.openInputStream(this) ?: throw FileNotFoundException()
fun Uri.outputStream() = cr.openOutputStream(this) ?: throw FileNotFoundException()
fun Uri.outputStream() = cr.openOutputStream(this, "rwt") ?: throw FileNotFoundException()
val Uri.displayName: String get() {
if (scheme == "file") {