code: public List<String> list(URL url, String path) throws IOException {
          InputStream is = null;
          try {
              List<String> resources = new ArrayList<String>();
  
              // First, try to find the URL of a JAR file containing the requested resource. If a JAR
              // file is found, then we'll list child resources by reading the JAR.
              URL jarUrl = findJarForResource(url);
              if (jarUrl != null) {
                  is = jarUrl.openStream();
                  return listResources(new JarInputStream(is), path);
              }
  
              List<String> children = new ArrayList<String>();
              children = this.getResourceUrls(url, path, is, children);
  
              // The URL prefix to use when recursively listing child resources
              String prefix = url.toExternalForm();
              if (!prefix.endsWith(PATH_SP)) {
                  prefix = prefix + PATH_SP;
              }
  
              // Iterate over immediate children, adding files and recursing into directories
              for (String child : children) {
                  String resourcePath = path + PATH_SP + child;
                  resources.add(resourcePath);
                  URL childUrl = new URL(prefix + child);
                  resources.addAll(list(childUrl, resourcePath));
              }
  
              return resources;
          } finally {
              IoHelper.closeQuietly(is);
          }
      }
docs: Recursively list the full resource path of all the resources that are children of the
  resource identified by a URL.
  
  @param url The URL that identifies the resource to list.
  @param path The path to the resource that is identified by the URL. Generally, this is the
  value passed to get the resource URL.
  @return A list containing the names of the child resources.
  @throws IOException If I/O errors occur