    001    /*
    002     * Licensed to the Apache Software Foundation (ASF) under one or more
    003     * contributor license agreements.  See the NOTICE file distributed with
    004     * this work for additional information regarding copyright ownership.
    005     * The ASF licenses this file to You under the Apache License, Version 2.0
    006     * (the "License"); you may not use this file except in compliance with
    007     * the License.  You may obtain a copy of the License at
    008     *
    009     *      http://www.apache.org/licenses/LICENSE-2.0
    010     *
    011     * Unless required by applicable law or agreed to in writing, software
    012     * distributed under the License is distributed on an "AS IS" BASIS,
    013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    014     * See the License for the specific language governing permissions and
    015     * limitations under the License.
    016     */
    017    package org.apache.commons.io.filefilter;
    018
    019    import java.io.File;
    020    import java.io.FileFilter;
    021    import java.io.FilenameFilter;
    022
    023    /**
    024     * An interface which brings the FileFilter and FilenameFilter
    025     * interfaces together.
    026     *
    027     * @since Commons IO 1.0
    028     * @version $Revision: 471628 $ $Date: 2006-11-06 04:06:45 +0000 (Mon, 06 Nov 2006) $
    029     *
    030     * @author Stephen Colebourne
    031     */
    032    public interface IOFileFilter extends FileFilter, FilenameFilter {
    033
    034        /**
    035         * Checks to see if the File should be accepted by this filter.
    036         * <p>
    037         * Defined in {@link java.io.FileFilter}.
    038         *
    039         * @param file  the File to check
    040         * @return true if this file matches the test
    041         */
    042        public boolean accept(File file);
    043
    044        /**
    045         * Checks to see if the File should be accepted by this filter.
    046         * <p>
    047         * Defined in {@link java.io.FilenameFilter}.
    048         *
    049         * @param dir  the directory File to check
    050         * @param name  the filename within the directory to check
    051         * @return true if this file matches the test
    052         */
    053        public boolean accept(File dir, String name);
    054
    055    }