test_class.declarator: logger = LoggerFactory.getLogger(FileUtilTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger logger = LoggerFactory.getLogger(FileUtilTest.class);
test_class.type: Logger
test_class.var_name: logger
test_class.declarator: TEST_FILE = "CHANGELOG.md"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_FILE = "CHANGELOG.md";
test_class.type: String
test_class.var_name: TEST_FILE
test_class.file: ch-commons-util/src/test/java/com/cloudhopper/commons/util/FileUtilTest.java
test_class.identifier: FileUtilTest
test_case.body: @Test(expected=FileNotFoundException.class)
      public void findFilesThrowsException1() throws Exception {
          // build.xml is not a directory!
          FileUtil.findFiles(new File("build.xml"), null);
      }
test_case.class_method_signature: FileUtilTest.findFilesThrowsException1()
test_case.full_signature: @Test(expected=FileNotFoundException.class) public void findFilesThrowsException1()
test_case.identifier: findFilesThrowsException1
test_case.invocations: findFiles
test_case.modifiers: @Test(expected=FileNotFoundException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void findFilesThrowsException1()
focal_class.file: ch-commons-util/src/main/java/com/cloudhopper/commons/util/FileUtil.java
focal_class.identifier: FileUtil
focal_class.class_method_signature: FileUtil.FileUtil()
focal_class.full_signature: private  FileUtil()
focal_class.identifier: FileUtil
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  FileUtil()
focal_class.class_method_signature: FileUtil.equals(InputStream is1, InputStream is2)
focal_class.full_signature: private static boolean equals(InputStream is1, InputStream is2)
focal_class.identifier: equals
focal_class.modifiers: private static
focal_class.parameters: (InputStream is1, InputStream is2)
focal_class.return: boolean
focal_class.signature: boolean equals(InputStream is1, InputStream is2)
focal_class.class_method_signature: FileUtil.equals(File file1, File file2)
focal_class.full_signature: public static boolean equals(File file1, File file2)
focal_class.identifier: equals
focal_class.modifiers: public static
focal_class.parameters: (File file1, File file2)
focal_class.return: boolean
focal_class.signature: boolean equals(File file1, File file2)
focal_class.class_method_signature: FileUtil.isValidFileExtension(String extension)
focal_class.full_signature: public static boolean isValidFileExtension(String extension)
focal_class.identifier: isValidFileExtension
focal_class.modifiers: public static
focal_class.parameters: (String extension)
focal_class.return: boolean
focal_class.signature: boolean isValidFileExtension(String extension)
focal_class.class_method_signature: FileUtil.parseFileExtension(String filename)
focal_class.full_signature: public static String parseFileExtension(String filename)
focal_class.identifier: parseFileExtension
focal_class.modifiers: public static
focal_class.parameters: (String filename)
focal_class.return: String
focal_class.signature: String parseFileExtension(String filename)
focal_class.class_method_signature: FileUtil.findFiles(File dir, FileFilter filter)
focal_class.full_signature: public static File[] findFiles(File dir, FileFilter filter)
focal_class.identifier: findFiles
focal_class.modifiers: public static
focal_class.parameters: (File dir, FileFilter filter)
focal_class.return: File[]
focal_class.signature: File[] findFiles(File dir, FileFilter filter)
focal_class.class_method_signature: FileUtil.copy(File sourceFile, File targetFile)
focal_class.full_signature: public static void copy(File sourceFile, File targetFile)
focal_class.identifier: copy
focal_class.modifiers: public static
focal_class.parameters: (File sourceFile, File targetFile)
focal_class.return: void
focal_class.signature: void copy(File sourceFile, File targetFile)
focal_class.class_method_signature: FileUtil.copy(File sourceFile, File targetFile, boolean overwrite)
focal_class.full_signature: public static boolean copy(File sourceFile, File targetFile, boolean overwrite)
focal_class.identifier: copy
focal_class.modifiers: public static
focal_class.parameters: (File sourceFile, File targetFile, boolean overwrite)
focal_class.return: boolean
focal_class.signature: boolean copy(File sourceFile, File targetFile, boolean overwrite)
focal_method.body: public static File[] findFiles(File dir, FileFilter filter) throws FileNotFoundException {
          if (!dir.exists()) {
              throw new FileNotFoundException("Directory " + dir + " does not exist.");
          }
  
          if (!dir.isDirectory()) {
              throw new FileNotFoundException("File " + dir + " is not a directory.");
          }
  
          // being matching process, create array for returning results
          ArrayList<File> files = new ArrayList<File>();
  
          // get all files in this directory
          File[] allFiles = dir.listFiles();
  
          // were any files returned?
          if (allFiles != null && allFiles.length > 0) {
              // loop thru every file in the dir
              for (File f : allFiles) {
                  // only match files, not a directory
                  if (f.isFile()) {
                      // delegate matching to provided file matcher
                      if (filter.accept(f)) {
                          files.add(f);
                      }
                  }
              }
          }
  
          // based on filesystem, order of files not guaranteed -- sort now
          File[] r = files.toArray(new File[0]);
          Arrays.sort(r);
          return r;
      }
focal_method.class_method_signature: FileUtil.findFiles(File dir, FileFilter filter)
focal_method.full_signature: public static File[] findFiles(File dir, FileFilter filter)
focal_method.identifier: findFiles
focal_method.invocations: exists isDirectory listFiles isFile accept add toArray sort
focal_method.modifiers: public static
focal_method.parameters: (File dir, FileFilter filter)
focal_method.return: File[]
focal_method.signature: File[] findFiles(File dir, FileFilter filter)