implicit final class Ops extends AnyVal
Adds additional methods to FileTreeView. This api may be changed so it should not be imported directly.
- Alphabetic
- By Inheritance
- Ops
- AnyVal
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Ops(fileTreeView: Nio[FileAttributes])
- fileTreeView
the FileTreeView to augment.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val fileTreeView: Nio[FileAttributes]
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def iterator(globs: Traversable[Glob], filter: PathFilter): Iterator[(Path, FileAttributes)]
Returns a filtered of the existing paths on the file system that match the Glob pattern.
Returns a filtered of the existing paths on the file system that match the Glob pattern. It should not throw an IOException and will return an empty sequence if no paths exist that match the patterns. It will print a warning if any of the globs do not have an absolute base path but it will expand the glob to
Paths.get("").toGlob / globfor traversal. It optimizes traversal so that each directory on the file system is only listed once:val dir = Paths.get("").toAbsolutePath.toGlob // This only lists the current directory once val view = FileTreeView.default val filter: (Path, FileAttributes) => Boolean = (_, a) => a.isRegularFile view.iterator(Seq(dir / "*.scala", dir / "*.java"), filter).foreach { case (path, attributes) => println(s"path: $$path, attributes: $$attributes") } // This lists the current directory twice (view.iterator(dir / "*.scala", filter) ++ view.iterator(dir / "*.java"), filter).foreach { case (path, attributes) => println(s"path: $$path, attributes: $$attributes") }
- globs
the search queries
- filter
the pathfilter
- returns
all of the paths that match the search query.
- def iterator(globs: Traversable[Glob]): Iterator[(Path, FileAttributes)]
Returns all of the existing paths on the file system that match the Glob pattern.
Returns all of the existing paths on the file system that match the Glob pattern. It should not throw an IOException and will return an empty sequence if no paths exist tha match the patterns. It will print a warning if any of the globs do not have an absolute base path but it will expand the glob to
Paths.get("").toGlob / globfor traversal. It optimizes traversal so that each directory on the file system is only listed once:val dir = Paths.get("").toAbsolutePath.toGlob // This only lists the current directory once val view = FileTreeView.default view.iterator(Seq(dir / "*.scala", dir / "*.java")).foreach { case (path: Path, attributes: FileAttributes) => println(s"path: $$path, attributes: $$attributes") } // This lists the current directory twice (view.iterator(dir / "*.scala") ++ view.iterator(dir / "*.java")) .foreach { case (path, attributes) => println(s"path: $$path, attributes: $$attributes") }
- globs
the search queries
- returns
all of the paths that match the search query.
- def iterator(glob: Glob, filter: PathFilter): Iterator[(Path, FileAttributes)]
Returns a filtered iterator for all of the existing paths on the file system that match the Glob pattern.
Returns a filtered iterator for all of the existing paths on the file system that match the Glob pattern. It should not throw an IOException and will return an empty sequence if no paths exist that match the pattern and the filter. It will print a warning if the glob does not have an absolute base path but it will expand the glob to
Paths.get("").toAbsolutePath.toGlob / globfor traversal.val dir = Paths.get("").toAbsolutePath.toGlob val regularNonHiddenFiles = FileTreeView.default.list(dir / "*.scala", (p: Path, a: FileAttributes) => a.isRegularFile && !Files.isHidden(p) )
- glob
the search query
- filter
the filter for the path name and attributes of each file in the result set
- returns
an iterator for all of the paths that match the search query.
- def iterator(glob: Glob): Iterator[(Path, FileAttributes)]
Returns an iterator for all of the existing paths on the file system that match the Glob pattern.
Returns an iterator for all of the existing paths on the file system that match the Glob pattern. It should not throw an IOException and will return an empty sequence if no paths exist that match the pattern. It will print a warning if the glob does not have an absolute base path but it will expand the glob to
Paths.get("").toAbsolutePath.toGlob / globfor traversal.- glob
the search query
- returns
an iterator for all of the paths that match the search query.
- def list(globs: Traversable[Glob], filter: PathFilter): Seq[(Path, FileAttributes)]
Returns a filtered list of the existing paths on the file system that match the Glob pattern.
Returns a filtered list of the existing paths on the file system that match the Glob pattern. It should not throw an IOException and will return an empty sequence if no paths exist that match the patterns and filter. It will print a warning if any of the globs do not have an absolute base path but it will expand the glob to
Paths.get("").toGlob / globfor traversal. It optimizes traversal so that each directory on the file system is only listed once:val dir = Paths.get("").toAbsolutePath.toGlob // This only lists the current directory once val view = FileTreeView.default val filter: (Path, FileAttributes) = (_, a) => a.isRegularFile val sources = view.list(Seq(dir / "*.scala", dir / "*.java"), filter) // This lists the current directory twice val slowSources = view.list(dir / "*.scala", filter) ++ view.list(current / "*.java", filter)
- globs
the search queries
- filter
the filter for the path name and attributes of each file in the result set
- returns
all of the paths that match the search query.
- def list(globs: Traversable[Glob]): Seq[(Path, FileAttributes)]
Returns all of the existing paths on the file system that match the Glob pattern.
Returns all of the existing paths on the file system that match the Glob pattern. This method should not throw and will return an empty sequence if no paths exist that match the patterns. It will print a warning if any of the globs do not have an absolute base path but it will expand the glob to
Paths.get("").toGlob / globfor traversal. It optimizes traversal so that each directory on the file system is only listed once:val dir = Paths.get("").toAbsolutePath.toGlob // This only lists the current directory once val view = FileTreeView.default val sources = view.list(Seq(dir / "*.scala", dir / "*.java")) // This lists the current directory twice val slowSources = view.list(dir / "*.scala") ++ view.list(current / "*.java")
- globs
the search queries
- returns
all of the paths that match the search query.
- def list(glob: Glob, filter: PathFilter): Seq[(Path, FileAttributes)]
Returns a filtered list of the existing paths on the file system that match the Glob pattern.
Returns a filtered list of the existing paths on the file system that match the Glob pattern. It should not throw an IOException and will return an empty sequence if no paths exist that match the patterns and filter. It will print a warning if any of the globs do not have an absolute base path but it will expand the glob to
Paths.get("").toGlob / globfor traversal.- glob
the search query
- filter
the filter for the path name and attributes of each file in the result set
- returns
all of the paths that match the search query.
- def list(glob: Glob): Seq[(Path, FileAttributes)]
Returns all of the existing paths on the file system that match the Glob pattern.
Returns all of the existing paths on the file system that match the Glob pattern. It should not throw an IOException and will return an empty sequence if no paths exist that match the pattern. It will print a warning if the glob does not have an absolute base path but it will expand the glob to
Paths.get("").toAbsolutePath.toGlob / globfor traversal.- glob
the search query
- returns
all of the paths that match the search query.
- def toString(): String
- Definition Classes
- Any