Class Scanner.Visitor

  • All Implemented Interfaces:
    java.nio.file.FileVisitor<java.nio.file.Path>
    Enclosing class:
    Scanner

    class Scanner.Visitor
    extends java.lang.Object
    implements java.nio.file.FileVisitor<java.nio.file.Path>
    Visitor A FileVisitor for walking a subtree of paths. The Scanner uses this to examine the dirs and files it has been asked to scan.
    • Constructor Summary

      Constructors 
      Constructor Description
      Visitor​(java.nio.file.Path root, IncludeExcludeSet<java.nio.file.PathMatcher,​java.nio.file.Path> rootIncludesExcludes, java.util.Map<java.lang.String,​Scanner.TimeNSize> scanInfoMap)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.nio.file.FileVisitResult postVisitDirectory​(java.nio.file.Path dir, java.io.IOException exc)  
      java.nio.file.FileVisitResult preVisitDirectory​(java.nio.file.Path dir, java.nio.file.attribute.BasicFileAttributes attrs)  
      java.nio.file.FileVisitResult visitFile​(java.nio.file.Path file, java.nio.file.attribute.BasicFileAttributes attrs)  
      java.nio.file.FileVisitResult visitFileFailed​(java.nio.file.Path file, java.io.IOException exc)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • rootIncludesExcludes

        IncludeExcludeSet<java.nio.file.PathMatcher,​java.nio.file.Path> rootIncludesExcludes
      • root

        java.nio.file.Path root
    • Constructor Detail

      • Visitor

        public Visitor​(java.nio.file.Path root,
                       IncludeExcludeSet<java.nio.file.PathMatcher,​java.nio.file.Path> rootIncludesExcludes,
                       java.util.Map<java.lang.String,​Scanner.TimeNSize> scanInfoMap)
    • Method Detail

      • preVisitDirectory

        public java.nio.file.FileVisitResult preVisitDirectory​(java.nio.file.Path dir,
                                                               java.nio.file.attribute.BasicFileAttributes attrs)
                                                        throws java.io.IOException
        Specified by:
        preVisitDirectory in interface java.nio.file.FileVisitor<java.nio.file.Path>
        Throws:
        java.io.IOException
      • visitFile

        public java.nio.file.FileVisitResult visitFile​(java.nio.file.Path file,
                                                       java.nio.file.attribute.BasicFileAttributes attrs)
                                                throws java.io.IOException
        Specified by:
        visitFile in interface java.nio.file.FileVisitor<java.nio.file.Path>
        Throws:
        java.io.IOException
      • visitFileFailed

        public java.nio.file.FileVisitResult visitFileFailed​(java.nio.file.Path file,
                                                             java.io.IOException exc)
                                                      throws java.io.IOException
        Specified by:
        visitFileFailed in interface java.nio.file.FileVisitor<java.nio.file.Path>
        Throws:
        java.io.IOException
      • postVisitDirectory

        public java.nio.file.FileVisitResult postVisitDirectory​(java.nio.file.Path dir,
                                                                java.io.IOException exc)
                                                         throws java.io.IOException
        Specified by:
        postVisitDirectory in interface java.nio.file.FileVisitor<java.nio.file.Path>
        Throws:
        java.io.IOException