Move an example to the correct method.
This commit is contained in:
parent
2504ab1e6e
commit
4afe7c7714
|
|
@ -156,14 +156,6 @@ trait ProcessCreation {
|
|||
* [[scala.sys.process.ProcessBuilder.Source]], which can then be
|
||||
* piped to something else.
|
||||
*
|
||||
* This will concatenate the output of all sources.
|
||||
*/
|
||||
def cat(file: Source, files: Source*): ProcessBuilder = cat(file +: files)
|
||||
|
||||
/** Create a [[scala.sys.process.ProcessBuilder]] from a non-empty sequence
|
||||
* of [[scala.sys.process.ProcessBuilder.Source]], which can then be
|
||||
* piped to something else.
|
||||
*
|
||||
* This will concatenate the output of all sources. For example:
|
||||
*
|
||||
* {{{
|
||||
|
|
@ -178,6 +170,14 @@ trait ProcessCreation {
|
|||
* cat(spde, dispatch, build) #| "grep -i scala" !
|
||||
* }}}
|
||||
*/
|
||||
def cat(file: Source, files: Source*): ProcessBuilder = cat(file +: files)
|
||||
|
||||
/** Create a [[scala.sys.process.ProcessBuilder]] from a non-empty sequence
|
||||
* of [[scala.sys.process.ProcessBuilder.Source]], which can then be
|
||||
* piped to something else.
|
||||
*
|
||||
* This will concatenate the output of all sources.
|
||||
*/
|
||||
def cat(files: Seq[Source]): ProcessBuilder = {
|
||||
require(files.nonEmpty)
|
||||
files map (_.cat) reduceLeft (_ #&& _)
|
||||
|
|
|
|||
Loading…
Reference in New Issue