Skip to content

Commit

Permalink
Add an ending line separator.
Browse files Browse the repository at this point in the history
  • Loading branch information
zainab-ali committed Dec 6, 2023
1 parent 1724c3e commit 43572fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion io/shared/src/main/scala/fs2/io/file/Files.scala
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,9 @@ sealed trait Files[F[_]] extends FilesPlatform[F] {
* using the specified flags to open the file.
*/
def writeUtf8Lines(path: Path, flags: Flags): Pipe[F, String, Nothing] = in =>
in.intersperse(lineSeparator).through(writeUtf8(path, flags))
in.intersperse(lineSeparator)
.append(Stream[F, String](lineSeparator))
.through(writeUtf8(path, flags))
}

private[fs2] trait FilesLowPriority { this: Files.type =>
Expand Down

0 comments on commit 43572fd

Please sign in to comment.