org.apache.commons.io.file

## Class SimplePathVisitor

- java.lang.Object
- - java.nio.file.SimpleFileVisitor<Path>
  - - org.apache.commons.io.file.SimplePathVisitor

- All Implemented Interfaces:
    FileVisitor<Path>, PathVisitor
  Direct Known Subclasses:
    CountingPathVisitor, NoopPathVisitor

      public abstract class SimplePathVisitor
      extends SimpleFileVisitor<Path>
      implements PathVisitor

  A `SimpleFileVisitor` typed to a `Path`.
  Since:
    2.7

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `SimplePathVisitor()` Constructs a new instance.
    `protected` | `SimplePathVisitor(IOBiFunction<Path,IOException,FileVisitResult> visitFileFailed)` Constructs a new instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `FileVisitResult` | `visitFileFailed(Path file, IOException exc)`

    - ### Methods inherited from class java.nio.file.SimpleFileVisitor

      `postVisitDirectory, preVisitDirectory, visitFile`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.nio.file.FileVisitor

      `postVisitDirectory, preVisitDirectory, visitFile`

- - ### Constructor Detail

    - #### SimplePathVisitor

          protected SimplePathVisitor()

      Constructs a new instance.

    - #### SimplePathVisitor

          protected SimplePathVisitor(IOBiFunction<Path,IOException,FileVisitResult> visitFileFailed)

      Constructs a new instance.
      Parameters:
        `visitFileFailed` - Called on `visitFileFailed(Path, IOException)`.

  - ### Method Detail

    - #### visitFileFailed

          public FileVisitResult visitFileFailed(Path file,
                                                 IOException exc)
                                          throws IOException

      Specified by:
        `visitFileFailed` in interface `FileVisitor<Path>`
      Overrides:
        `visitFileFailed` in class `SimpleFileVisitor<Path>`
      Throws:
        `IOException`

Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.