Here you can find the source of find(String path, String suffix)
public static boolean find(String path, String suffix)
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { public static boolean find(String path, String suffix) { File[] files = (new File(path)).listFiles(); for (File file : files) { if (file.isDirectory()) return find(file.getAbsolutePath(), suffix); else if (file.getName().endsWith(suffix)) return true; }/*w w w . j av a2 s .co m*/ return false; } }