diff options
author | Seth Tisue <seth@tisue.net> | 2016-09-16 16:02:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-16 16:02:21 -0700 |
commit | 823b2d9b130296576d91a86a45e7f6c7d7d94b48 (patch) | |
tree | 3f88ebdf7bc50fe730b45894952aa8af0c11f77a | |
parent | 81a67eeacc7d2622ee364a21203b227142e2043e (diff) | |
parent | 5c245f0e771fc0a25713e2b75661be603802d7a4 (diff) | |
download | scala-823b2d9b130296576d91a86a45e7f6c7d7d94b48.tar.gz scala-823b2d9b130296576d91a86a45e7f6c7d7d94b48.tar.bz2 scala-823b2d9b130296576d91a86a45e7f6c7d7d94b48.zip |
Merge pull request #5405 from getfreebirdinc/2.11.x
In ProcessBuilder docs, replace .lines w/ .lineStream
-rw-r--r-- | src/library/scala/sys/process/ProcessBuilder.scala | 8 | ||||
-rw-r--r-- | src/library/scala/sys/process/package.scala | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/library/scala/sys/process/ProcessBuilder.scala b/src/library/scala/sys/process/ProcessBuilder.scala index ac86495001..e4344a857e 100644 --- a/src/library/scala/sys/process/ProcessBuilder.scala +++ b/src/library/scala/sys/process/ProcessBuilder.scala @@ -90,19 +90,19 @@ import ProcessBuilder._ * * If not specified, the input of the external commands executed with `run` or * `!` will not be tied to anything, and the output will be redirected to the - * stdout and stderr of the Scala process. For the methods `!!` and `lines`, no + * stdout and stderr of the Scala process. For the methods `!!` and `lineStream`, no * input will be provided, and the output will be directed according to the * semantics of these methods. * * Some methods will cause stdin to be used as input. Output can be controlled - * with a [[scala.sys.process.ProcessLogger]] -- `!!` and `lines` will only + * with a [[scala.sys.process.ProcessLogger]] -- `!!` and `lineStream` will only * redirect error output when passed a `ProcessLogger`. If one desires full * control over input and output, then a [[scala.sys.process.ProcessIO]] can be * used with `run`. * - * For example, we could silence the error output from `lines_!` like this: + * For example, we could silence the error output from `lineStream_!` like this: * {{{ - * val etcFiles = "find /etc" lines_! ProcessLogger(line => ()) + * val etcFiles = "find /etc" lineStream_! ProcessLogger(line => ()) * }}} * * ==Extended Example== diff --git a/src/library/scala/sys/process/package.scala b/src/library/scala/sys/process/package.scala index 445c3aee60..ac6ab8f670 100644 --- a/src/library/scala/sys/process/package.scala +++ b/src/library/scala/sys/process/package.scala @@ -25,7 +25,7 @@ package scala.sys { * * {{{ * import scala.sys.process._ - * "ls" #| "grep .scala" #&& Seq("sh", "-c", "scalac *.scala") #|| "echo nothing found" lines + * "ls" #| "grep .scala" #&& Seq("sh", "-c", "scalac *.scala") #|| "echo nothing found" lineStream * }}} * * We describe below the general concepts and architecture of the package, @@ -92,7 +92,7 @@ package scala.sys { * * - Return status of the process (`!` methods) * - Output of the process as a `String` (`!!` methods) - * - Continuous output of the process as a `Stream[String]` (`lines` methods) + * - Continuous output of the process as a `Stream[String]` (`lineStream` methods) * - The `Process` representing it (`run` methods) * * Some simple examples of these methods: @@ -109,7 +109,7 @@ package scala.sys { * // a Stream[String] * def sourceFilesAt(baseDir: String): Stream[String] = { * val cmd = Seq("find", baseDir, "-name", "*.scala", "-type", "f") - * cmd.lines + * cmd.lineStream * } * }}} * @@ -167,8 +167,8 @@ package scala.sys { * def sourceFilesAt(baseDir: String): (Stream[String], StringBuffer) = { * val buffer = new StringBuffer() * val cmd = Seq("find", baseDir, "-name", "*.scala", "-type", "f") - * val lines = cmd lines_! ProcessLogger(buffer append _) - * (lines, buffer) + * val lineStream = cmd lineStream_! ProcessLogger(buffer append _) + * (lineStream, buffer) * } * }}} * |