Class IfAccumulatedFileSize

  • All Implemented Interfaces:
    PathCondition

    @Plugin(name="IfAccumulatedFileSize",
            category="Core",
            printObject=true)
    public final class IfAccumulatedFileSize
    extends Object
    implements PathCondition
    PathCondition that accepts paths after the accumulated file size threshold is exceeded during the file tree walk.
    • Method Detail

      • getThresholdBytes

        public long getThresholdBytes()
      • accept

        public boolean accept​(Path basePath,
                              Path relativePath,
                              BasicFileAttributes attrs)
        Description copied from interface: PathCondition
        Returns true if the specified candidate path should be deleted, false otherwise.
        Specified by:
        accept in interface PathCondition
        Parameters:
        basePath - 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