- Companion:
- class
Type members
Classlikes
Provides extension methods to java.nio.file.Path
Provides extension methods to java.nio.file.Path
- Value parameters:
- file
the
File
instance to extend.
Provides extension methods to Glob that allows it to create combined
sbt.nio.file.PathFilter instances with &&
and ||
.
Provides extension methods to Glob that allows it to create combined
sbt.nio.file.PathFilter instances with &&
and ||
.
- Value parameters:
- glob
the Glob to extend
Provides extension methods to java.nio.file.Path
.
Provides extension methods to java.nio.file.Path
.
- Value parameters:
- path
the
Path
instance to extend.
Value members
Concrete methods
- Value parameters:
- file
the single path to match.
- Returns:
a Glob whose Glob.matches method only accepts the input path.
Construct a Glob with a file prefix and relativeGlob glob string. For example:
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
- Value parameters:
- 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
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 to
file
must match the relativeGlob
. For example:
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 to
file
must match the relativeGlob
. 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
- Value parameters:
- 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
.
Appends a relative glob specified by a regex pattern to an existing Glob. For example:
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.
- Value parameters:
- file
the file prefix of the pattern
- regex
the pattern to apply
- Returns:
a Glob with the new RelativeGlob appended to the query.
Construct a single path Glob. The resulting glob
Construct a single path Glob. The resulting glob
- Value parameters:
- path
the single path to match.
- Returns:
a Glob whose Glob.matches method only accepts the input path.
Construct a Glob with a path prefix and a RelativeGlob
. For example:
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
- Value parameters:
- 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
Construct a Glob with a file prefix and relativeGlob glob string. For example:
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
- Value parameters:
- 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
Appends a relative glob specified by a regex pattern to an existing Glob. For example:
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.
- Value parameters:
- path
the file path prefix of the pattern
- regex
the pattern to apply
- Returns:
a Glob with the new RelativeGlob appended to the query.
Construct a glob from a string. It can represent a full path. Any /
characters in a pathname
are automatically converted to \\
on windows.
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")
- Value parameters:
- 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
.
Implicits
Implicits
Provides extension methods to Glob that allows it to create combined
sbt.nio.file.PathFilter instances with &&
and ||
.
Provides extension methods to Glob that allows it to create combined
sbt.nio.file.PathFilter instances with &&
and ||
.
- Value parameters:
- glob
the Glob to extend