Java File Find find(String path, String suffix)

Here you can find the source of find(String path, String suffix)

Description

find

License

Open Source License

Declaration

public static boolean find(String path, String suffix) 

Method Source Code

//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;
    }
}

Related

  1. find(final File root, final String name)
  2. find(String _sSourceString, String _sReg, int group)
  3. find(String executable, File... dirs)
  4. find(String name, File dir)
  5. find(String path, String matcher)
  6. find2(File baseDir, FileFilter filter, List files, boolean includeHiddenFiles)
  7. findByExt(File base, String ext)
  8. findByExtension(final File directory, final String extension)
  9. findByFileName(List files, String fileName)