A path which is either an absolute Path or a relative RelPath, with shared APIs and implementations
Extends collections to give short aliases for the commonly used operations, so we can make it easy to use from the command line.
An absolute path on the filesystem.
An absolute path on the filesystem. Note that the path is normalized and cannot contain any empty, "." or ".." segments
Lets you pipe values through functions
Lets you pattern match strings with interpolated glob-variables
An absolute path on the filesystem.
An absolute path on the filesystem. Note that the path is normalized and cannot contain any empty or ".". Parent ".." segments can only occur at the left-end of the path, and are collapsed into a single number ups.
Dynamic shell command execution.
Dynamic shell command execution. This allows you to run commands which are not provided by Ammonite, by shelling out to bash. e.g. try
%ls %ls / %ps "aux"
Extractor to let you easily pattern match on Paths
Lets you call FilterMap aliases on Arrays too
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
Copies a file from one place to another.
Copies a file from one place to another. Creates any necessary directories
The current working directory for this process.
Checks if a file or folder exists at the given path.
Makes directories up to the specified path.
Moves a file from one place to another.
Moves a file from one place to another. Creates any necessary directories
Reads a file into memory, either as a string, as a Seq[String] of lines, or as a Array[Byte]
Roughly equivalent to bash's rm -rf
.
Roughly equivalent to bash's rm -rf
. Deletes any files or folders in the
target path, or does nothing if there aren't any
The root of the filesystem
Write some data to a file.
Write some data to a file. This can be a String, an Array[Byte], or a Seq[String] which is treated as consecutive lines. By default, this fails if a file already exists at the target location. Use write.over or write.append if you want to over-write it or add to what's already there.