Class

sbt.io

Mapper

Related Doc: package io

Permalink

abstract class Mapper extends AnyRef

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Mapper
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Mapper()

    Permalink

Type Members

  1. type FileMap = (File) ⇒ Option[File]

    Permalink
  2. type PathMap = (File) ⇒ Option[String]

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def abs: FileMap

    Permalink

    Pairs a File with the absolute File obtained by calling getAbsoluteFile.

    Pairs a File with the absolute File obtained by calling getAbsoluteFile. Note that this usually means that relative files are resolved against the current working directory.

  5. def allSubpaths(base: File): Traversable[(File, String)]

    Permalink

    Selects all descendants of base directory and maps them to a path relative to base.

    Selects all descendants of base directory and maps them to a path relative to base. base itself is not included.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. val basic: PathMap

    Permalink

    A path mapper that pairs a File with the path returned by calling getPath on it.

  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def contentOf(baseDirectory: File): Seq[(File, String)]

    Permalink

    return a Seq of mappings excluding the directory itself.

    return a Seq of mappings excluding the directory itself.

    baseDirectory

    The directory that should be turned into a mappings sequence.

    returns

    mappings - The basicDirectory's contents exlcuding basicDirectory itself

    Examples:
    1. Add a static directory "extra" and re-map the destination to a different path

      mappings ++= contentOf(baseDirectory.value / "extra").map {
        case (src, destination) => src -> s"new/path/$destination"
      }
    2. ,
    3. In order to create mappings for a static directory "extra" add

      mappings ++= contentOf(baseDirectory.value / "extra")

      The resulting mappings sequence will look something like this

      File($baseDirectory/extras/file1) -> "file1"
      File($baseDirectory/extras/file2) -> "file2"
      ...
  10. def directory(baseDirectory: File): Seq[(File, String)]

    Permalink

    return a Seq of mappings which effect is to add a whole directory in the generated package

    return a Seq of mappings which effect is to add a whole directory in the generated package

    baseDirectory

    The directory that should be turned into a mappings sequence.

    returns

    mappings The baseDirectory and all of its contents

    Example:
    1. In order to create mappings for a static directory "extra" add

      mappings ++= directory(baseDirectory.value / "extra")

      The resulting mappings sequence will look something like this

      File($baseDirectory/extras) -> "extras"
      File($baseDirectory/extras/file1) -> "extras/file1"
      File($baseDirectory/extras/file2) -> "extras/file2"
      ...
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def fail: (Any) ⇒ Nothing

    Permalink

    A mapper that throws an exception for any input.

    A mapper that throws an exception for any input. This is useful as the last mapper in a pipeline to ensure every input gets mapped.

  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def flat(newDirectory: File): FileMap

    Permalink

    Constructs a FileMap that pairs a file with a file with the same name in newDirectory.

    Constructs a FileMap that pairs a file with a file with the same name in newDirectory. For example, if newDirectory is /a/b, then /r/s/t/d.txt will be paired with /a/b/d.txt

  16. val flat: PathMap

    Permalink

    A path mapper that pairs a File with its name.

    A path mapper that pairs a File with its name. For example, /x/y/z.txt gets paired with z.txt.

  17. def flatRebase(newBase: String): PathMap

    Permalink

    A path mapper that pairs a File with a path constructed from newBase and the file's name.

    A path mapper that pairs a File with a path constructed from newBase and the file's name. For example, if newBase = /new/a/, then /old/x/z.txt gets paired with /new/a/z.txt.

  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. def normalizeBase(base: String): String

    Permalink
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. def rebase(oldBase: File, newBase: File): FileMap

    Permalink

    Produces a File mapper that pairs a descendant of oldBase with a file in newBase that preserving the relative path of the original file against oldBase.

    Produces a File mapper that pairs a descendant of oldBase with a file in newBase that preserving the relative path of the original file against oldBase. For example, if oldBase is /old/x/ and newBase is /new/a/, /old/x/y/z.txt gets paired with /new/a/y/z.txt.

  26. def rebase(oldBases: Iterable[File], newBase: File, zero: FileMap = transparent): FileMap

    Permalink
  27. def rebase(oldBase: File, newBase: String): PathMap

    Permalink

    A path mapper that pairs a descendent of oldBase with newBase prepended to the path relative to oldBase.

    A path mapper that pairs a descendent of oldBase with newBase prepended to the path relative to oldBase. For example, if oldBase = /old/x/ and newBase = new/a/, then /old/x/y/z.txt gets paired with new/a/y/z.txt.

  28. def relativeTo(bases: Iterable[File], zero: PathMap = transparent): PathMap

    Permalink
  29. def relativeTo(base: File): PathMap

    Permalink

    A path mapper that pairs a File with its path relative to base.

    A path mapper that pairs a File with its path relative to base. If the File is not a descendant of base, it is not handled (None is returned by the mapper).

  30. def resolve(newDirectory: File): FileMap

    Permalink

    Returns a FileMap that resolves a relative File against newDirectory and pairs the original File with the resolved File.

    Returns a FileMap that resolves a relative File against newDirectory and pairs the original File with the resolved File. The mapper ignores absolute files.

  31. def selectSubpaths(base: File, filter: FileFilter): Traversable[(File, String)]

    Permalink

    Selects descendants of base directory matching filter and maps them to a path relative to base.

    Selects descendants of base directory matching filter and maps them to a path relative to base. base itself is not included.

  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  33. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  34. def total[A, B](f: (A) ⇒ B): (A) ⇒ Some[B]

    Permalink

    A mapper that is defined on all inputs by the function f.

  35. def transparent: (Any) ⇒ Option[Nothing]

    Permalink

    A mapper that ignores all inputs.

  36. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped