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 018package org.apache.commons.io.file; 019 020import java.io.IOException; 021import java.nio.file.FileVisitResult; 022import java.nio.file.Path; 023 024import org.apache.commons.io.function.IOBiFunction; 025 026/** 027 * A noop path visitor. 028 * 029 * @since 2.9.0 030 */ 031public class NoopPathVisitor extends SimplePathVisitor { 032 033 /** 034 * The singleton instance. 035 */ 036 public static final NoopPathVisitor INSTANCE = new NoopPathVisitor(); 037 038 /** 039 * Constructs a new instance. 040 */ 041 public NoopPathVisitor() { 042 } 043 044 /** 045 * Constructs a new instance. 046 * 047 * @param visitFileFailed Called on {@link #visitFileFailed(Path, IOException)}. 048 * @since 2.12.0 049 */ 050 public NoopPathVisitor(final IOBiFunction<Path, IOException, FileVisitResult> visitFileFailed) { 051 super(visitFileFailed); 052 } 053}