Skip to content

Commit 823b2d9

Browse files
authored
Merge pull request scala#5405 from getfreebirdinc/2.11.x
In ProcessBuilder docs, replace .lines w/ .lineStream
2 parents 81a67ee + 5c245f0 commit 823b2d9

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/library/scala/sys/process/ProcessBuilder.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,19 @@ import ProcessBuilder._
9090
*
9191
* If not specified, the input of the external commands executed with `run` or
9292
* `!` will not be tied to anything, and the output will be redirected to the
93-
* stdout and stderr of the Scala process. For the methods `!!` and `lines`, no
93+
* stdout and stderr of the Scala process. For the methods `!!` and `lineStream`, no
9494
* input will be provided, and the output will be directed according to the
9595
* semantics of these methods.
9696
*
9797
* Some methods will cause stdin to be used as input. Output can be controlled
98-
* with a [[scala.sys.process.ProcessLogger]] -- `!!` and `lines` will only
98+
* with a [[scala.sys.process.ProcessLogger]] -- `!!` and `lineStream` will only
9999
* redirect error output when passed a `ProcessLogger`. If one desires full
100100
* control over input and output, then a [[scala.sys.process.ProcessIO]] can be
101101
* used with `run`.
102102
*
103-
* For example, we could silence the error output from `lines_!` like this:
103+
* For example, we could silence the error output from `lineStream_!` like this:
104104
* {{{
105-
* val etcFiles = "find /etc" lines_! ProcessLogger(line => ())
105+
* val etcFiles = "find /etc" lineStream_! ProcessLogger(line => ())
106106
* }}}
107107
*
108108
* ==Extended Example==

src/library/scala/sys/process/package.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ package scala.sys {
2525
*
2626
* {{{
2727
* import scala.sys.process._
28-
* "ls" #| "grep .scala" #&& Seq("sh", "-c", "scalac *.scala") #|| "echo nothing found" lines
28+
* "ls" #| "grep .scala" #&& Seq("sh", "-c", "scalac *.scala") #|| "echo nothing found" lineStream
2929
* }}}
3030
*
3131
* We describe below the general concepts and architecture of the package,
@@ -92,7 +92,7 @@ package scala.sys {
9292
*
9393
* - Return status of the process (`!` methods)
9494
* - Output of the process as a `String` (`!!` methods)
95-
* - Continuous output of the process as a `Stream[String]` (`lines` methods)
95+
* - Continuous output of the process as a `Stream[String]` (`lineStream` methods)
9696
* - The `Process` representing it (`run` methods)
9797
*
9898
* Some simple examples of these methods:
@@ -109,7 +109,7 @@ package scala.sys {
109109
* // a Stream[String]
110110
* def sourceFilesAt(baseDir: String): Stream[String] = {
111111
* val cmd = Seq("find", baseDir, "-name", "*.scala", "-type", "f")
112-
* cmd.lines
112+
* cmd.lineStream
113113
* }
114114
* }}}
115115
*
@@ -167,8 +167,8 @@ package scala.sys {
167167
* def sourceFilesAt(baseDir: String): (Stream[String], StringBuffer) = {
168168
* val buffer = new StringBuffer()
169169
* val cmd = Seq("find", baseDir, "-name", "*.scala", "-type", "f")
170-
* val lines = cmd lines_! ProcessLogger(buffer append _)
171-
* (lines, buffer)
170+
* val lineStream = cmd lineStream_! ProcessLogger(buffer append _)
171+
* (lineStream, buffer)
172172
* }
173173
* }}}
174174
*

0 commit comments

Comments
 (0)