Package

ammonite

ops

Permalink

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

    Permalink
  2. class Bytes extends AnyRef

    Permalink

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

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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink
  8. trait Extensions extends AnyRef

    Permalink
  9. type FilePath = os.FilePath

    Permalink
  10. type FileType = os.FileType

    Permalink
  11. class FilterMapExt[+T, Repr] extends AnyRef

    Permalink

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

  12. class FilterMapExt2[+T] extends AnyRef

    Permalink

    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 FilterMapExtGen[+T] extends AnyRef

    Permalink

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

  14. case class InteractiveShelloutException() extends Exception with Product with Serializable

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

    Permalink

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

  16. type Path = os.Path

    Permalink
  17. type PermSet = os.PermSet

    Permalink
  18. class Pipeable[T] extends AnyRef

    Permalink

    Lets you pipe values through functions

  19. class RegexContext extends AnyRef

    Permalink

    Lets you pattern match strings with interpolated glob-variables

  20. type RelPath = os.RelPath

    Permalink
  21. type ResourceNotFoundException = os.ResourceNotFoundException

    Permalink
  22. type ResourceRoot = os.ResourceRoot

    Permalink
  23. case class Shellable(s: Seq[String]) extends Product with Serializable

    Permalink

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

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

    Permalink

    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

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

    Permalink

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

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

    Permalink

    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

  27. implicit class iterShow[T] extends AnyRef

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

    Permalink

    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]

    Permalink

    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]

    Permalink

    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

    Permalink

    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

    Permalink
  5. implicit def Callable1Implicit[T1, R](f: (T1) ⇒ R): Callable1[T1, R]

    Permalink
    Definition Classes
    Extensions
  6. object Extensions extends Extensions

    Permalink
  7. val FilePath: os.FilePath.type

    Permalink
  8. val FileType: os.FileType.type

    Permalink
  9. implicit def FilterMapArraysImplicit[T](a: Array[T]): FilterMapExt[T, Array[T]]

    Permalink

    Lets you call FilterMapExt aliases on Arrays too

    Lets you call FilterMapExt aliases on Arrays too

    Definition Classes
    Extensions
  10. implicit def FilterMapExtImplicit[T, Repr](i: TraversableLike[T, Repr]): FilterMapExt[T, Repr]

    Permalink
    Definition Classes
    Extensions
  11. implicit def FilterMapGeneratorsImplicit[T](a: Generator[T]): FilterMapExtGen[T]

    Permalink
    Definition Classes
    Extensions
  12. implicit def FilterMapIteratorsImplicit[T](a: Iterator[T]): FilterMapExt2[T]

    Permalink
    Definition Classes
    Extensions
  13. object ImplicitWd

    Permalink

    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

  14. object Internals

    Permalink
  15. val Path: os.Path.type

    Permalink
  16. val PathError: os.PathError.type

    Permalink
  17. val PermSet: os.PermSet.type

    Permalink
  18. implicit def PipeableImplicit[T](t: T): Pipeable[T]

    Permalink
    Definition Classes
    Extensions
  19. object RegexContext

    Permalink
  20. implicit def RegexContextMaker(s: StringContext): RegexContext

    Permalink
    Definition Classes
    Extensions
  21. val RelPath: os.RelPath.type

    Permalink
  22. val ResourceNotFoundException: os.ResourceNotFoundException.type

    Permalink
  23. val ResourceRoot: os.ResourceRoot.type

    Permalink
  24. implicit def SeqFactoryFunc[T, CC[X] <: Seq[X] with GenericTraversableTemplate[X, CC]](s: SeqFactory[CC]): (Seq[T]) ⇒ CC[T]

    Permalink

    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
  25. object Shellable extends Serializable

    Permalink
  26. object Shellout

    Permalink

    Internal utilities to support spawning subprocesses

  27. implicit def StringPath(s: String): RelPath

    Permalink
  28. implicit def SymPath(s: Symbol): RelPath

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

    Permalink

    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.

  30. val empty: os.RelPath

    Permalink
  31. val exists: os.exists.type

    Permalink
  32. implicit def fileData(p: Path): FullStatInfo

    Permalink

    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.

  33. val home: os.Path

    Permalink

    The user's home directory

  34. object ln extends (Path, Path) ⇒ Unit

    Permalink
  35. object ls extends (Path) ⇒ LsSeq

    Permalink
  36. val mkdir: all.type

    Permalink
  37. object mv extends (Path, Path) ⇒ Unit with Mover with CopyMove

    Permalink

    Moves a file or folder from one place to another.

    Moves a file or folder from one place to another.

    Creates any necessary directories

  38. implicit val postfixOps: postfixOps

    Permalink
  39. val pwd: os.Path

    Permalink

    The current working directory for this process.

  40. val read: os.read.type

    Permalink
  41. def resource(implicit resRoot: ResourceRoot = ...): ResourcePath

    Permalink
  42. val rm: all.type

    Permalink
  43. val root: os.Path

    Permalink

    The root of the filesystem

  44. object stat extends (Path) ⇒ StatInfo

    Permalink
  45. val tmp: temp.type

    Permalink
  46. val up: os.RelPath

    Permalink
  47. val write: os.write.type

    Permalink

Inherited from Extensions

Inherited from AnyRef

Inherited from Any

Ungrouped