org.apache.catalina.WebResourceSet.list()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(101)

本文整理了Java中org.apache.catalina.WebResourceSet.list()方法的一些代码示例,展示了WebResourceSet.list()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebResourceSet.list()方法的具体详情如下:
包路径:org.apache.catalina.WebResourceSet
类名称:WebResourceSet
方法名:list

WebResourceSet.list介绍

[英]Obtain the list of the names of all of the files and directories located in the specified directory.
[中]获取位于指定目录中的所有文件和目录的名称列表。

代码示例

代码示例来源:origin: org.springframework.boot/spring-boot

@Override
public String[] list(String path) {
  return this.delegate.list(path);
}

代码示例来源:origin: codefollower/Tomcat-Research

private String[] list(String path, boolean validate) {
  if (validate) {
    path = validate(path);
  }
  // Set because we don't want duplicates
  // LinkedHashSet to retain the order. It is the order of the
  // WebResourceSet that matters but it is simpler to retain the order
  // over all of the JARs.
  HashSet<String> result = new LinkedHashSet<>();
  for (ArrayList<WebResourceSet> list : allResources) {
    for (WebResourceSet webResourceSet : list) {
      if (!webResourceSet.getClassLoaderOnly()) {
        String[] entries = webResourceSet.list(path);
        for (String entry : entries) {
          result.add(entry);
        }
      }
    }
  }
  return result.toArray(new String[result.size()]);
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

private String[] list(String path, boolean validate) {
  if (validate) {
    path = validate(path);
  }
  // Set because we don't want duplicates
  // LinkedHashSet to retain the order. It is the order of the
  // WebResourceSet that matters but it is simpler to retain the order
  // over all of the JARs.
  HashSet<String> result = new LinkedHashSet<>();
  for (List<WebResourceSet> list : allResources) {
    for (WebResourceSet webResourceSet : list) {
      if (!webResourceSet.getClassLoaderOnly()) {
        String[] entries = webResourceSet.list(path);
        for (String entry : entries) {
          result.add(entry);
        }
      }
    }
  }
  return result.toArray(new String[result.size()]);
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

private String[] list(String path, boolean validate) {
  if (validate) {
    path = validate(path);
  }
  // Set because we don't want duplicates
  // LinkedHashSet to retain the order. It is the order of the
  // WebResourceSet that matters but it is simpler to retain the order
  // over all of the JARs.
  HashSet<String> result = new LinkedHashSet<>();
  for (List<WebResourceSet> list : allResources) {
    for (WebResourceSet webResourceSet : list) {
      if (!webResourceSet.getClassLoaderOnly()) {
        String[] entries = webResourceSet.list(path);
        for (String entry : entries) {
          result.add(entry);
        }
      }
    }
  }
  return result.toArray(new String[result.size()]);
}

代码示例来源:origin: org.apache.tomee/tomee-catalina

final File baseFile = URLs.toFile(base);
if (baseFile.isDirectory()) {
  final String[] libs = wr.list("/WEB-INF/lib/");
  if (libs != null) {
    for (final String resource : libs) {

相关文章