Skip to content

Commit

Permalink
Fix swapped NioPath.sink/source javadoc (square#1235)
Browse files Browse the repository at this point in the history
Co-authored-by: Jesse Wilson <[email protected]>
  • Loading branch information
I-Al-Istannen and squarejesse authored Jun 19, 2023
1 parent 1525ec2 commit a5dd954
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions okio/src/jvmMain/kotlin/okio/JvmOkio.kt
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,12 @@ fun File.appendingSink(): Sink = FileOutputStream(this, true).sink()
@Throws(FileNotFoundException::class)
fun File.source(): Source = InputStreamSource(inputStream(), Timeout.NONE)

/** Returns a source that reads from `path`. */
/** Returns a sink that writes to `path`. */
@Throws(IOException::class)
fun NioPath.sink(vararg options: OpenOption): Sink =
Files.newOutputStream(this, *options).sink()

/** Returns a sink that writes to `path`. */
/** Returns a source that reads from `path`. */
@Throws(IOException::class)
fun NioPath.source(vararg options: OpenOption): Source =
Files.newInputStream(this, *options).source()
Expand Down

0 comments on commit a5dd954

Please sign in to comment.