Interface PathCondition

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean accept​(java.nio.file.Path baseDir, java.nio.file.Path relativePath, java.nio.file.attribute.BasicFileAttributes attrs)
      Returns true if the specified candidate path should be deleted, false otherwise.
      void beforeFileTreeWalk()
      Invoked before a new file tree walk is started.
    • Method Detail

      • beforeFileTreeWalk

        void beforeFileTreeWalk()
        Invoked before a new file tree walk is started. Stateful PathConditions can reset their state when this method is called.
      • accept

        boolean accept​(java.nio.file.Path baseDir,
                       java.nio.file.Path relativePath,
                       java.nio.file.attribute.BasicFileAttributes attrs)
        Returns true if the specified candidate path should be deleted, false otherwise.
        Parameters:
        baseDir - the directory from where to start scanning for deletion candidate files
        relativePath - the candidate for deletion. This path is relative to the baseDir.
        attrs - attributes of the candidate path
        Returns:
        whether the candidate path should be deleted