Class CleaningPathVisitor

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

    public class CleaningPathVisitor
    extends CountingPathVisitor
    Deletes files but not directories as a visit proceeds.
    Since:
    2.7
    • Constructor Detail

      • CleaningPathVisitor

        public CleaningPathVisitor​(Counters.PathCounters pathCounter,
                                   DeleteOption[] deleteOption,
                                   java.lang.String... skip)
        Constructs a new visitor that deletes files except for the files and directories explicitly given.
        Parameters:
        pathCounter - How to count visits.
        deleteOption - options indicating how deletion is handled.
        skip - The files to skip deleting.
        Since:
        2.8.0
      • CleaningPathVisitor

        public CleaningPathVisitor​(Counters.PathCounters pathCounter,
                                   java.lang.String... skip)
        Constructs a new visitor that deletes files except for the files and directories explicitly given.
        Parameters:
        pathCounter - How to count visits.
        skip - The files to skip deleting.