Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.sys/scala.sys.process/Process

Process

scala.sys.process.Process
See theProcess companion trait

Methods for constructing simple commands that can then be combined.

Attributes

Companion
trait
Source
Process.scala
Graph
Supertypes
classObject
traitMatchable
classAny
Self type
Process.type

Members list

Value members

Inherited methods

defapply(name:String,exitValue:=>Int):ProcessBuilder

Creates ascala.sys.process.ProcessBuilder from aString name and aBoolean.

Creates ascala.sys.process.ProcessBuilder from aString name and aBoolean. This can be used to force an exit value, with the name being used fortoString.

Attributes

Inherited from:
ProcessCreation
Source
Process.scala

Creates ascala.sys.process.ProcessBuilder from aBoolean.

Creates ascala.sys.process.ProcessBuilder from aBoolean. This can be to force an exit value.

Attributes

Inherited from:
ProcessCreation
Source
Process.scala
defapply(url:URL):URLBuilder

Creates ascala.sys.process.ProcessBuilder from ajava.net.URL.

Creates ascala.sys.process.ProcessBuilder from ajava.net.URL. ThisProcessBuilder can then be used as aSource, so that one can pipe things from it.

Attributes

Inherited from:
ProcessCreation
Source
Process.scala
defapply(file:File):FileBuilder

Creates ascala.sys.process.ProcessBuilder from ajava.io.File.

Creates ascala.sys.process.ProcessBuilder from ajava.io.File. ThisProcessBuilder can then be used as aSource or aSink, so one can pipe things from and to it.

Attributes

Inherited from:
ProcessCreation
Source
Process.scala
defapply(builder:JProcessBuilder):ProcessBuilder

Creates ascala.sys.process.ProcessBuilder from ajava.lang.ProcessBuilder.

Creates ascala.sys.process.ProcessBuilder from ajava.lang.ProcessBuilder.

Attributes

Example

apply((new java.lang.ProcessBuilder("ls", "-l")) directory new java.io.File(System.getProperty("user.home")))
Inherited from:
ProcessCreation
Source
Process.scala
defapply(command:Seq[String],cwd:Option[File],extraEnv: (String,String)*):ProcessBuilder

Creates ascala.sys.process.ProcessBuilder with working dir optionally set toFile and extra environment variables.

Creates ascala.sys.process.ProcessBuilder with working dir optionally set toFile and extra environment variables.

Attributes

Example

apply("java" :: javaArgs, params.get("cwd"), "CLASSPATH" -> "library.jar")
Inherited from:
ProcessCreation
Source
Process.scala
defapply(command:String,cwd:Option[File],extraEnv: (String,String)*):ProcessBuilder

Creates ascala.sys.process.ProcessBuilder with working dir optionally set toFile and extra environment variables.

Creates ascala.sys.process.ProcessBuilder with working dir optionally set toFile and extra environment variables.

Attributes

Example

apply("java", params.get("cwd"), "CLASSPATH" -> "library.jar")
Inherited from:
ProcessCreation
Source
Process.scala
defapply(command:Seq[String],cwd:File,extraEnv: (String,String)*):ProcessBuilder

Creates ascala.sys.process.ProcessBuilder with working dir set toFile and extra environment variables.

Creates ascala.sys.process.ProcessBuilder with working dir set toFile and extra environment variables.

Attributes

Example

apply("java" :: javaArgs, new java.io.File("/opt/app"), "CLASSPATH" -> "library.jar")
Inherited from:
ProcessCreation
Source
Process.scala
defapply(command:String,cwd:File,extraEnv: (String,String)*):ProcessBuilder

Creates ascala.sys.process.ProcessBuilder with working dir set toFile and extra environment variables.

Creates ascala.sys.process.ProcessBuilder with working dir set toFile and extra environment variables.

Attributes

Example

apply("java", new java.io.File("/opt/app"), "CLASSPATH" -> "library.jar")
Inherited from:
ProcessCreation
Source
Process.scala
defapply(command:String,arguments:Seq[String]):ProcessBuilder

Creates ascala.sys.process.ProcessBuilder from a command represented by aString, and a sequence ofString representing the arguments.

Creates ascala.sys.process.ProcessBuilder from a command represented by aString, and a sequence ofString representing the arguments.

Attributes

Example

apply("cat", files)
Inherited from:
ProcessCreation
Source
Process.scala

Creates ascala.sys.process.ProcessBuilder from a sequence ofString, where the head is the command and each element of the tail is a parameter.

Creates ascala.sys.process.ProcessBuilder from a sequence ofString, where the head is the command and each element of the tail is a parameter.

Attributes

Example

apply("cat" :: files)
Inherited from:
ProcessCreation
Source
Process.scala

Creates ascala.sys.process.ProcessBuilder from aString, including the parameters.

Creates ascala.sys.process.ProcessBuilder from aString, including the parameters.

Attributes

Example

apply("cat file.txt")
Inherited from:
ProcessCreation
Source
Process.scala
defapplySeq[T](builders:Seq[T])(implicitconvert:T=>Source):Seq[Source]

Creates a sequence ofscala.sys.process.ProcessBuilder.Source from a sequence of something else for which there's an implicit conversion toSource.

Creates a sequence ofscala.sys.process.ProcessBuilder.Source from a sequence of something else for which there's an implicit conversion toSource.

Attributes

Inherited from:
ProcessCreation
Source
Process.scala

Creates ascala.sys.process.ProcessBuilder from a non-empty sequence ofscala.sys.process.ProcessBuilder.Source, which can then be piped to something else.

Creates ascala.sys.process.ProcessBuilder from a non-empty sequence ofscala.sys.process.ProcessBuilder.Source, which can then be piped to something else.

This will concatenate the output of all sources.

Attributes

Inherited from:
ProcessCreation
Source
Process.scala

Creates ascala.sys.process.ProcessBuilder from one or morescala.sys.process.ProcessBuilder.Source, which can then be piped to something else.

Creates ascala.sys.process.ProcessBuilder from one or morescala.sys.process.ProcessBuilder.Source, which can then be piped to something else.

This will concatenate the output of all sources. For example:

import scala.sys.process._import scala.sys.process.Process.catimport java.net.URLimport java.io.Fileval spde = new URL("http://technically.us/spde.html")val dispatch = new URL("https://dispatchhttp.org/Dispatch.html")val build = new File("project/build.properties")cat(spde, dispatch, build) #| "grep -i scala" !

Attributes

Inherited from:
ProcessCreation
Source
Process.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp