Packages

c

sbt.nio.file.Glob

GlobOps

implicit final class GlobOps extends AnyVal

Provides extension methods for Glob.

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GlobOps
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GlobOps(glob: Glob)

    glob

    the Glob to augment.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. def /(relativeGlob: RelativeGlob): Glob

    Appends a relative glob path to an existing Glob.

    Appends a relative glob path to an existing Glob. For example:

    val glob = Glob("foo/bar")
    val scalaSources = glob / "**<code>/</code>*.scala"
    scalaSources.matches(Paths.get("foo/bar/Foo.scala")) // true
    scalaSources.matches(Paths.get("foo/bar/baz/fizz/buzz/Bar.scala")) // true
    scalaSources.matches(Paths.get("foo/bar/baz/fizz/buzz/Baz.java")) // false
    relativeGlob

    the RelativeGlob to be appended to the query

    returns

    a Glob with the new RelativeGlob appended to the query.

  4. def /(regex: Regex): Glob

    Appends a relative glob specified by a regex pattern to an existing Glob.

    Appends a relative glob specified by a regex pattern to an existing Glob. For example:

    val glob = Glob("foo/bar")
    val scalaSources = glob / "^[^.].*\\.scala".r
    scalaSources.matches(Paths.get("foo/bar/Foo.scala")) // true
    scalaSources.matches(Paths.get("foo/bar/.hidden.scala")) // false

    Note that it is not possible to specify a recursive glob this way because ** is not valid in regex. To make a recursive glob, combine with RecursiveGlob:

    val scalaSources = Glob("foo/bar") / ** / "^[^.].*\\.scala".r
    scalaSources.matches(Paths.get("foo/bar/baz/fizz/buzz/Foo.scala")) // true
    scalaSources.matches(Paths.get("foo/bar/baz/fizz/buzz/.hidden.scala")) // false

    On Windows, \ will be treated as a regex escape character but / will be treated as a path separator.

    regex

    the pattern to apply

    returns

    a Glob with the new RelativeGlob appended to the query.

  5. def /(relativeGlob: String): Glob

    Appends a relative glob path to an existing Glob.

    Appends a relative glob path to an existing Glob. For example:

    val glob = Glob("foo/bar")
    val scalaSources = glob / "**<code>/</code>*.scala"
    scalaSources.matches(Paths.get("foo/bar/Foo.scala")) // true
    scalaSources.matches(Paths.get("foo/bar/baz/fizz/buzz/Bar.scala")) // true
    scalaSources.matches(Paths.get("foo/bar/baz/fizz/buzz/Baz.java")) // false
    relativeGlob

    the string that will be parsed into a RelativeGlob and appended to the base glob

    returns

    a Glob with the new RelativeGlob appended to the query.

  6. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  9. val glob: Glob
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. def toString(): String
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped