← Docs
kotlin-stdlib / kotlin.io.path / java.nio.file.Path / outputStream

outputStream

JVM
JRE7
1.5
fun Path . outputStream (
vararg options : OpenOption
) : OutputStream

(source)

Constructs a new OutputStream of this file and returns it as a result.

The options parameter determines how the file is opened. If no options are present then it is equivalent to opening the file with the CREATE , TRUNCATE_EXISTING , and WRITE options.

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Supported and developed by JetBrains .
Kotlin™ is protected under the Kotlin Foundation
and licensed under the Apache 2 license .