test_class.file: shared/src/test/java/org/eclipse/steady/shared/util/DirUtilTest.java
test_class.identifier: DirUtilTest
test_case.body: @Test
    public void testGetAllFiles() {
      final File[] f1 = DirUtil.getAllFiles(new File("./src/test/resources/foo"), null);
      assertEquals(4, f1.length);
  
      final File[] f2 =
          DirUtil.getAllFiles(new File("./src/test/resources/foo"), new String[] {"bar"});
      assertEquals(3, f2.length);
  
      final File[] f3 =
          DirUtil.getAllFiles(new File("./src/test/resources/foo"), new String[] {"bar", "baz"});
      assertEquals(2, f3.length);
    }
test_case.class_method_signature: DirUtilTest.testGetAllFiles()
test_case.full_signature: @Test public void testGetAllFiles()
test_case.identifier: testGetAllFiles
test_case.invocations: getAllFiles assertEquals getAllFiles assertEquals getAllFiles assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetAllFiles()
focal_class.declarator: log = org.apache.logging.log4j.LogManager.getLogger()
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = org.apache.logging.log4j.LogManager.getLogger();
focal_class.type: Logger
focal_class.var_name: log
focal_class.file: shared/src/main/java/org/eclipse/steady/shared/util/DirUtil.java
focal_class.identifier: DirUtil
focal_class.class_method_signature: DirUtil.containsFile(final File _dir, final String _filename)
focal_class.full_signature: public static final boolean containsFile(final File _dir, final String _filename)
focal_class.identifier: containsFile
focal_class.modifiers: public static final
focal_class.parameters: (final File _dir, final String _filename)
focal_class.return: boolean
focal_class.signature: boolean containsFile(final File _dir, final String _filename)
focal_class.class_method_signature: DirUtil.getAllFiles(final File _dir, final String[] _ignore)
focal_class.full_signature: public static File[] getAllFiles(final File _dir, final String[] _ignore)
focal_class.identifier: getAllFiles
focal_class.modifiers: public static
focal_class.parameters: (final File _dir, final String[] _ignore)
focal_class.return: File[]
focal_class.signature: File[] getAllFiles(final File _dir, final String[] _ignore)
focal_class.class_method_signature: DirUtil.unzip(final File _zip, File _out_dir)
focal_class.full_signature: public static File unzip(final File _zip, File _out_dir)
focal_class.identifier: unzip
focal_class.modifiers: public static
focal_class.parameters: (final File _zip, File _out_dir)
focal_class.return: File
focal_class.signature: File unzip(final File _zip, File _out_dir)
focal_class.class_method_signature: DirUtil.isBelowDestinationPath(Path _destination_path, String _entry_name)
focal_class.full_signature: public static boolean isBelowDestinationPath(Path _destination_path, String _entry_name)
focal_class.identifier: isBelowDestinationPath
focal_class.modifiers: public static
focal_class.parameters: (Path _destination_path, String _entry_name)
focal_class.return: boolean
focal_class.signature: boolean isBelowDestinationPath(Path _destination_path, String _entry_name)
focal_class.class_method_signature: DirUtil.filterSubpaths(
        Set<Path> _to_be_filtered, Set<Path> _filter, boolean _keep_subpaths)
focal_class.full_signature: public static Set<Path> filterSubpaths(
        Set<Path> _to_be_filtered, Set<Path> _filter, boolean _keep_subpaths)
focal_class.identifier: filterSubpaths
focal_class.modifiers: public static
focal_class.parameters: (
        Set<Path> _to_be_filtered, Set<Path> _filter, boolean _keep_subpaths)
focal_class.return: Set<Path>
focal_class.signature: Set<Path> filterSubpaths(
        Set<Path> _to_be_filtered, Set<Path> _filter, boolean _keep_subpaths)
focal_class.class_method_signature: DirUtil.getDigest(final File _dir, final String[] _ignore, DigestAlgorithm _alg)
focal_class.full_signature: public static String getDigest(final File _dir, final String[] _ignore, DigestAlgorithm _alg)
focal_class.identifier: getDigest
focal_class.modifiers: public static
focal_class.parameters: (final File _dir, final String[] _ignore, DigestAlgorithm _alg)
focal_class.return: String
focal_class.signature: String getDigest(final File _dir, final String[] _ignore, DigestAlgorithm _alg)
focal_method.body: public static File[] getAllFiles(final File _dir, final String[] _ignore) {
      if (!_dir.isDirectory())
        throw new IllegalArgumentException("[" + _dir + "] is not a directory");
  
      final List<File> list = new ArrayList<File>();
  
      final File[] files = _dir.listFiles();
      if (files != null) {
        Arrays.sort(files);
        outer:
        for (final File file : files) {
          if (file.isDirectory()) {
            list.addAll(Arrays.asList(DirUtil.getAllFiles(file, _ignore)));
            list.add(file);
          } else {
            if (_ignore != null) {
              for (String ext : _ignore) {
                if (file.getName().endsWith(ext)) {
                  continue outer;
                }
              }
            }
            list.add(file);
          }
        }
      }
      return list.toArray(new File[list.size()]);
    }
focal_method.class_method_signature: DirUtil.getAllFiles(final File _dir, final String[] _ignore)
focal_method.full_signature: public static File[] getAllFiles(final File _dir, final String[] _ignore)
focal_method.identifier: getAllFiles
focal_method.invocations: isDirectory listFiles sort isDirectory addAll asList getAllFiles add endsWith getName add toArray size
focal_method.modifiers: public static
focal_method.parameters: (final File _dir, final String[] _ignore)
focal_method.return: File[]
focal_method.signature: File[] getAllFiles(final File _dir, final String[] _ignore)