package ops

Linear Supertypes
Extensions, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ops
  2. Extensions
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type BasePath = os.BasePath
  2. class Bytes extends AnyRef

    Trivial wrapper around Array[Byte] with sane equality and useful toString

  3. class Callable1[T1, R] extends (T1) ⇒ R

    Provides a.! b as an alternative to the a(b) syntax for calling a function with one argument

  4. class Callable2[T1, T2, R] extends (T1, T2) ⇒ R

    Provides a! b as an alternative to the (a(b, _) syntax for partially applying a function with two arguments

  5. case class Command[T](cmd: Vector[String], envArgs: Map[String, String], execute: (Path, Command[_]) ⇒ T) extends Dynamic with Product with Serializable

    A staged sub-process command that has yet to be executed.

  6. case class CommandResult(exitCode: Int, chunks: Seq[Either[Bytes, Bytes]]) extends Product with Serializable

    Contains the accumulated output for the invocation of a subprocess command.

    Contains the accumulated output for the invocation of a subprocess command.

    Apart from the exit code, the primary data-structure is a sequence of byte chunks, tagged with Left for stdout and Right for stderr. This is interleaved roughly in the order it was emitted by the subprocess, and reflects what a user would have see if the subprocess was run manually.

    Derived from that, is the aggregate out and err StreamValues, wrapping stdout/stderr respectively, and providing convenient access to the aggregate output of each stream, as bytes or strings or lines.

  7. trait CopyMove extends (Path, Path) ⇒ Unit
  8. trait Extensions extends AnyRef
  9. implicit class iterShow[T] extends AnyRef
    Definition Classes
    Extensions
  10. type FilePath = os.FilePath
  11. type FileType = os.FileType
  12. class FilterMapExt[+T, Repr] extends AnyRef

    Extends collections to give short aliases for the commonly used operations, so we can make it easy to use from the command line.

  13. class FilterMapExt2[+T] extends AnyRef

    Extends collections to give short aliases for the commonly used operations, so we can make it easy to use from the command line.

  14. class FilterMapExtGen[+T] extends AnyRef

    Extends collections to give short aliases for the commonly used operations, so we can make it easy to use from the command line.

  15. case class InteractiveShelloutException() extends Exception with Product with Serializable
  16. case class LsSeq(base: Path, listed: RelPath*) extends Seq[Path] with Product with Serializable

    A specialized Seq[Path] used to provide better a better pretty-printed experience

  17. type Path = os.Path
  18. type PermSet = os.PermSet
  19. class Pipeable[T] extends AnyRef

    Lets you pipe values through functions

  20. class RegexContext extends AnyRef

    Lets you pattern match strings with interpolated glob-variables

  21. type RelPath = os.RelPath
  22. type ResourceNotFoundException = os.ResourceNotFoundException
  23. type ResourceRoot = os.ResourceRoot
  24. case class Shellable(s: Seq[String]) extends Product with Serializable

    An implicit wrapper defining the things that can be "interpolated" directly into a subprocess call.

  25. case class ShelloutException(result: CommandResult) extends Exception with Product with Serializable

    Thrown when a shellout command results in a non-zero exit code.

    Thrown when a shellout command results in a non-zero exit code.

    Doesn't contain any additional information apart from the CommandResult that is normally returned, but ensures that failures in subprocesses happen loudly and won't get ignored unless intentionally caught

  26. case class StreamValue(chunks: Seq[Bytes]) extends Product with Serializable

    Encapsulates one of the output streams from a subprocess and provides convenience methods for accessing it in a variety of forms

  27. trait StreamableOp1[T1, R, C <: Seq[R]] extends (T1) ⇒ C

    An Callable1 that returns a Seq[R], but can also do so lazily (Iterator[R]) via op.iter! arg.

    An Callable1 that returns a Seq[R], but can also do so lazily (Iterator[R]) via op.iter! arg. You can then use the iterator however you wish

  28. case class kill(signal: Int)(implicit wd: Path) extends (Int) ⇒ CommandResult with Product with Serializable

    Kills the given process with the given signal, e.g.

    Kills the given process with the given signal, e.g. kill(9)! pid

Value Members

  1. val %: Command[Unit]

    Used to spawn a subprocess interactively; any output gets printed to the console and any input gets requested from the current console.

    Used to spawn a subprocess interactively; any output gets printed to the console and any input gets requested from the current console. Can be used to run interactive subprocesses like %vim, %python, %ssh "www.google.com" or %sbt.

  2. val %%: Command[CommandResult]

    Spawns a subprocess non-interactively, waiting for it to complete and collecting all output into a CommandResult which exposes it in a convenient form.

    Spawns a subprocess non-interactively, waiting for it to complete and collecting all output into a CommandResult which exposes it in a convenient form. Call via %%('whoami).out.trim or %%('git, 'commit, "-am", "Hello!").exitCode

  3. val /: os./.type

    Extractor to let you easily pattern match on ops.Paths.

    Extractor to let you easily pattern match on ops.Paths. Lets you do

    @ val base/segment/filename = pwd
    base: Path = Path(Vector("Users", "haoyi", "Dropbox (Personal)"))
    segment: String = "Workspace"
    filename: String = "Ammonite"

    To break apart a path and extract various pieces of it.

  4. val BasePath: os.BasePath.type
  5. implicit def Callable1Implicit[T1, R](f: (T1) ⇒ R): Callable1[T1, R]
    Definition Classes
    Extensions
  6. val FilePath: os.FilePath.type
  7. val FileType: os.FileType.type
  8. implicit def FilterMapArraysImplicit[T](a: Array[T]): FilterMapExt[T, Array[T]]

    Lets you call FilterMapExt aliases on Arrays too

    Lets you call FilterMapExt aliases on Arrays too

    Definition Classes
    Extensions
  9. implicit def FilterMapExtImplicit[T, Repr](i: TraversableLike[T, Repr]): FilterMapExt[T, Repr]
    Definition Classes
    Extensions
  10. implicit def FilterMapGeneratorsImplicit[T](a: Generator[T]): FilterMapExtGen[T]
    Definition Classes
    Extensions
  11. implicit def FilterMapIteratorsImplicit[T](a: Iterator[T]): FilterMapExt2[T]
    Definition Classes
    Extensions
  12. val Path: os.Path.type
  13. val PathError: os.PathError.type
  14. val PermSet: os.PermSet.type
  15. implicit def PipeableImplicit[T](t: T): Pipeable[T]
    Definition Classes
    Extensions
  16. implicit def RegexContextMaker(s: StringContext): RegexContext
    Definition Classes
    Extensions
  17. val RelPath: os.RelPath.type
  18. val ResourceNotFoundException: os.ResourceNotFoundException.type
  19. val ResourceRoot: os.ResourceRoot.type
  20. implicit def SeqFactoryFunc[T, CC[X] <: Seq[X] with GenericTraversableTemplate[X, CC]](s: SeqFactory[CC]): (Seq[T]) ⇒ CC[T]

    Allows you to pipe sequences into other sequences to convert them, e.g.

    Allows you to pipe sequences into other sequences to convert them, e.g. Seq(1, 2, 3) |> Vector

    Definition Classes
    Extensions
  21. implicit def StringPath(s: String): RelPath
  22. implicit def SymPath(s: Symbol): RelPath
  23. val empty: os.RelPath
  24. val exists: os.exists.type
  25. implicit def fileData(p: Path): FullStatInfo

    Lets you treat any path as a file, letting you access any property you'd normally access through stat-ing it by stat-ing the file for you when necessary.

  26. val home: os.Path

    The user's home directory

  27. val mkdir: all.type
  28. implicit val postfixOps: postfixOps
  29. val pwd: os.Path

    The current working directory for this process.

  30. val read: os.read.type
  31. def resource(implicit resRoot: ResourceRoot = ...): ResourcePath
  32. val rm: all.type
  33. val root: os.Path

    The root of the filesystem

  34. val tmp: temp.type
  35. val up: os.RelPath
  36. val write: os.write.type
  37. object Extensions extends Extensions
  38. object ImplicitWd

    If you want to call subprocesses using % or %% and don't care what working directory they use, import this via

    If you want to call subprocesses using % or %% and don't care what working directory they use, import this via

    import ammonite.ops.ImplicitWd._

    To make them use the process's working directory for each subprocess

  39. object Internals
  40. object RegexContext
  41. object Shellable extends Serializable
  42. object Shellout

    Internal utilities to support spawning subprocesses

  43. object cp extends (Path, Path) ⇒ Unit with CopyMove

    Copies a file or folder from one place to another.

    Copies a file or folder from one place to another. Creates any necessary directories, and copies folders recursively.

  44. object ln extends (Path, Path) ⇒ Unit
  45. object ls extends (Path) ⇒ LsSeq
  46. object mv extends (Path, Path) ⇒ Unit with Mover with CopyMove

    Moves a file or folder from one place to another.

    Moves a file or folder from one place to another.

    Creates any necessary directories

  47. object stat extends (Path) ⇒ StatInfo

Inherited from Extensions

Inherited from AnyRef

Inherited from Any

Ungrouped