object Glob
- Alphabetic
- By Inheritance
- Glob
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
final
class
FileOps extends AnyVal
Provides extension methods to
java.nio.file.Path
-
implicit final
class
GlobOps extends AnyVal
Provides extension methods for Glob.
-
implicit final
class
PathFilterOps extends AnyVal with PathFilterExtensions
Provides extension methods to Glob that allows it to create combined sbt.nio.file.PathFilter instances with
&&
and||
. -
final
class
PathOps extends AnyVal
Provides extension methods to
java.nio.file.Path
.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply(glob: String): Glob
Construct a glob from a string.
Construct a glob from a string. It can represent a full path. Any
/
characters in a pathname are automatically converted to\\
on windows.val absoluteGlob = Glob("/foo/bar<code>/</code>**<code>/</code>*.txt") val relativeGlob = Glob("*<code>/</code>*.txt")
- glob
the string to convert to a glob
- returns
a parsed
Glob
for the input. May throw if the input cannot be parsed into aGlob
.
-
def
apply(path: Path, 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 scalaSources = Glob(file("foo/bar"), "^[^.].*\\.scala".r scalaSources.matches(Paths.get("foo/bar/Foo.scala")) // true scalaSources.matches(Paths.get("foo/bar/.hidden.scala")) // false
Note that on Windows,
\
will be treated as a regex escape character but/
will be treated as a path separator.- path
the file path prefix of the pattern
- regex
the pattern to apply
- returns
a Glob with the new RelativeGlob appended to the query.
-
def
apply(path: Path, relative: String): Glob
Construct a Glob with a file prefix and relativeGlob glob string.
Construct a Glob with a file prefix and relativeGlob glob string. For example:
val glob = Glob(file("foo/bar"), "*.txt") // matches all text files in foo/bar
- path
the prefix of the glob pattern. This can be an absolute or relativeGlob file.
- relative
the relativeGlob glob string
- returns
a Glob that matches the file prefix with
-
def
apply(path: Path, relativeGlob: RelativeGlob): Glob
Construct a Glob with a path prefix and a
RelativeGlob
.Construct a Glob with a path prefix and a
RelativeGlob
. For example:val txtFiles = Glob(Paths.get("foo/bar"), * / "*.txt") // matches all text files in any subdirectory of foo/bar val allChildren = Glob(Paths.get("/foo/bar"), **) // matches all descendants of /foo/bar val scalaSources = Glob(Paths.get("src/main/scala", ** / "*.scala")) // matches scala source file
- path
the prefix of the glob pattern. This can be an absolute or relativeGlob file.
- relativeGlob
the RelativeGlob to append to the file prefix
- returns
a Glob that matches the file prefix with
-
def
apply(path: Path): Glob
Construct a single path Glob.
Construct a single path Glob. The resulting glob
- path
the single path to match.
- returns
a Glob whose Glob.matches method only accepts the input path.
-
def
apply(file: File, 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 scalaSources = Glob(file("foo/bar"), "^[^.].*\\.scala".r scalaSources.matches(Paths.get("foo/bar/Foo.scala")) // true scalaSources.matches(Paths.get("foo/bar/.hidden.scala")) // false
Note that on Windows,
\
will be treated as a regex escape character but/
will be treated as a path separator.- file
the file prefix of the pattern
- regex
the pattern to apply
- returns
a Glob with the new RelativeGlob appended to the query.
-
def
apply(file: File, relativeGlob: RelativeGlob): Glob
Construct a Glob with a file prefix and a RelativeGlob suffix.
Construct a Glob with a file prefix and a RelativeGlob suffix. In order for a path to match the output Glob, it must start with
file
and its relative path with respect tofile
must match therelativeGlob
. For example:val txtFiles = Glob(file("foo/bar"), * / "*.txt") // matches all text files in any subdirectory of foo/bar val allChildren = Glob(file("/foo/bar"), **) // matches all descendants of /foo/bar val scalaSources = Glob(file("src/main/scala", ** / "*.scala")) // matches scala source file
- file
the prefix of the glob pattern. This can be an absolute or relativeGlob file.
- relativeGlob
the RelativeGlob to append to the file prefix
- returns
a Glob that matches a path with the same prefix as
file
and whose suffix matchesrelativeGlob
.
-
def
apply(file: File, relative: String): Glob
Construct a Glob with a file prefix and relativeGlob glob string.
Construct a Glob with a file prefix and relativeGlob glob string. For example:
val glob = Glob(file("foo/bar"), "*.txt") // matches all txt files in foo/bar val recursiveGlob = Glob(file("foo/bar"), "**<code>/</code>*.txt") // recursively matches all text files in foo/bar
- file
the prefix of the glob pattern. This can be an absolute or relativeGlob file.
- relative
the relativeGlob glob string
- returns
a Glob that matches the file prefix with
-
def
apply(file: File): Glob
Construct a single file Glob.
- file
the single path to match.
- returns
a Glob whose Glob.matches method only accepts the input path.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
implicit
def
stringToGlob(glob: String): Glob
Converts a string to a Glob.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
implicit
object
ordering extends Ordering[Glob]
Provides a default ordering for glob.
Provides a default ordering for glob. Globs with a path prefix precede relative globs and are sorted by their path prefix.