jodd-core/src/main/java/jodd/io/FileUtil.java
public static boolean isFilePathAcceptable(File file, final FileFilter fileFilter) {
		do {
			if (fileFilter != null && !fileFilter.accept(file)) {
				return false;
			}
			file = file.getParentFile();
		} while (file != null);
		return true;
	}
public static boolean isFilePathAcceptable(File file, final FileFilter fileFilter) {
		do {
			if (fileFilter != null && !fileFilter.accept(file)) {
				return false;
			}
			file = file.getParentFile();
		} while (file != null);
		return true;
	}
public static boolean isFilePathAcceptable ( File file , final FileFilter fileFilter ) { do { if ( fileFilter != null && ! fileFilter . accept ( file ) ) { return false ; } file = file . getParentFile ( ) ; } while ( file != null ) ; return true ; }
Checks if file and its ancestors are acceptable by using {@link FileFilter#accept(File)}.

@param file       {@link File} to check.
@param fileFilter {@link FileFilter} to use.
@return if file and its ancestors are acceptable
Checks if file and its ancestors are acceptable by using { @link FileFilter#accept ( File ) } .