ammonite

ops

package ops

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ops
  2. RelPathStuff
  3. Extensions
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait BasePath extends AnyRef

    A path which is either an absolute Path, a relative RelPath, or a ResourcePath with shared APIs and implementations.

  2. trait BasePathImpl extends BasePath

  3. class Bytes extends AnyRef

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

  4. 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

  5. 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

  6. 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.

  7. 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.

  8. trait CopyMove extends (Path, Path) ⇒ Unit

  9. trait Extensions extends AnyRef

  10. sealed trait FilePath extends BasePath

    Represents a value that is either an absolute Path or a relative ResourcePath, and can be constructed from

  11. sealed trait FileType extends AnyRef

    Simple enum with the possible filesystem objects a path can resolve to

  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. trait ImplicitOp[V] extends (Path) ⇒ V

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

  17. 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

  18. case class Path extends FilePath with BasePathImpl with Readable with Product with Serializable

    An absolute path on the filesystem.

  19. sealed trait PathFactory[PathType <: BasePath] extends (String) ⇒ PathType

    Enforces a standard interface for constructing BasePath-like things from java types of various sorts

  20. class PermSet extends Set[PosixFilePermission]

    A set of permissions

  21. class Pipeable[T] extends AnyRef

    Lets you pipe values through functions

  22. trait Readable extends AnyRef

    A path that can be read from, either a Path or a ResourcePath.

  23. class RegexContext extends AnyRef

    Lets you pattern match strings with interpolated glob-variables

  24. case class RelPath extends FilePath with BasePathImpl with Product with Serializable

    An absolute path on the filesystem.

  25. implicit class RelPathStart extends AnyRef

    Definition Classes
    RelPathStuff
  26. implicit class RelPathStart2 extends AnyRef

    Definition Classes
    RelPathStuff
  27. trait RelPathStuff extends AnyRef

  28. case class ResourceNotFoundException(path: ResourcePath) extends Exception with Product with Serializable

    Thrown when you try to read from a resource that doesn't exist.

  29. case class ResourcePath extends BasePathImpl with Readable with Product with Serializable

    Classloaders are tricky: http://stackoverflow.

  30. sealed trait ResourceRoot extends AnyRef

    Represents a possible root where classpath resources can be loaded from; either a ResourceRoot.ClassLoader or a ResourceRoot.Class.

  31. 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.

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

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

  33. 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

  34. 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.

  35. implicit class iterShow[T] extends AnyRef

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

    Kills the given process with the given signal, e.

  37. case class stat(name: String, size: Long, mtime: FileTime, owner: UserPrincipal, permissions: PermSet, fileType: FileType) extends Product with Serializable

    The result from doing an system stat on a particular path.

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. object /

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

  4. object BasePath

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

    Definition Classes
    Extensions
  6. implicit def Callable2[T1, T2, R](f: (T1, T2) ⇒ R): Callable2[T1, T2, R]

    Definition Classes
    Extensions
  7. implicit def ChainableConversions[T, T1, V](f: (T) ⇒ V)(implicit i: (T1) ⇒ T): (T1) ⇒ V

    Definition Classes
    Extensions
  8. object Extensions extends Extensions

  9. object FilePath extends PathFactory[FilePath]

  10. object FileType

  11. implicit def FilterMapArrays[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
  12. implicit def FilterMapExt[T, Repr](i: TraversableLike[T, Repr]): FilterMapExt[T, Repr]

    Definition Classes
    Extensions
  13. implicit def FilterMapGenerators[T](a: Generator[T]): FilterMapExtGen[T]

    Definition Classes
    Extensions
  14. implicit def FilterMapIterators[T](a: Iterator[T]): FilterMapExt2[T]

    Definition Classes
    Extensions
  15. object ImplicitWd

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

  16. object Internals

  17. object Path extends PathFactory[Path] with Serializable

  18. object PathError

  19. object PermSet

  20. implicit def Pipeable[T](t: T): Pipeable[T]

    Definition Classes
    Extensions
  21. object Readable

  22. object RegexContext

  23. implicit def RegexContextMaker(s: StringContext): RegexContext

    Definition Classes
    Extensions
  24. object RelPath extends RelPathStuff with PathFactory[RelPath] with Serializable

  25. object ResourcePath extends Serializable

  26. object ResourceRoot

  27. 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.

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

    Definition Classes
    Extensions
  28. object Shellable extends Serializable

  29. object Shellout

    Internal utilities to support spawning subprocesses

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

    Copies a file or folder from one place to another.

  31. val empty: RelPath

    Definition Classes
    RelPathStuff
  32. object exists extends (Path) ⇒ Boolean

    Checks if a file or folder exists at the given path.

  33. implicit def fileData(p: Path): full

    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.

  34. val home: Path

    The user's home directory

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

    Creates a hardlink between two paths.

  36. object ls extends StreamableOp1[Path, Path, LsSeq] with ImplicitOp[LsSeq]

    List the files and folders in a directory.

  37. object mkdir extends (Path) ⇒ Unit

    Makes directories up to the specified path.

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

    Moves a file or folder from one place to another.

  39. implicit val postfixOps: postfixOps

  40. lazy val pwd: Path

    The current working directory for this process.

  41. object read extends (Readable) ⇒ String

    Reads a file into memory, either as a String, as (read.

  42. def resource(implicit resRoot: ResourceRoot = ...): ResourcePath

  43. object rm extends (Path) ⇒ Unit

    Roughly equivalent to bash's rm -rf.

  44. val root: Path

    The root of the filesystem

  45. object stat extends (Path) ⇒ stat with Serializable

  46. object tmp

    Alias for java.nio.file.Files.createTempFile and java.io.File.deleteOnExit.

  47. val up: RelPath

    Definition Classes
    RelPathStuff
  48. object write extends (Path, Writable) ⇒ Unit

    Write some data to a file.

Deprecated Value Members

  1. lazy val cwd: Path

    Annotations
    @deprecated
    Deprecated

    (Since version 0.7.5) replaced by pwd

Inherited from RelPathStuff

Inherited from Extensions

Inherited from AnyRef

Inherited from Any

Ungrouped