Class IfAll

    • Method Detail

      • accept

        public boolean accept​(Path baseDir,
                              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:
        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
      • accept

        public static boolean accept​(PathCondition[] list,
                                     Path baseDir,
                                     Path relativePath,
                                     BasicFileAttributes attrs)
        Returns true if all the specified conditions accept the specified path, false otherwise.
        Parameters:
        list - the array of conditions to evaluate
        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:
        true if all the specified conditions accept the specified path, false otherwise
        Throws:
        NullPointerException - if any of the parameters is null
      • createAndCondition

        @PluginFactory
        public static IfAll createAndCondition​(@PluginElement("PathConditions")
                                               PathCondition... components)
        Create a Composite PathCondition whose components all need to accept before this condition accepts.
        Parameters:
        components - The component filters.
        Returns:
        A Composite PathCondition.