hudson.FilePath.listDirectories()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(138)

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

FilePath.listDirectories介绍

[英]List up subdirectories.
[中]列出子目录。

代码示例

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

public List<String> listSubDirectories(String dir) throws IOException, InterruptedException {
  List<String> r = new ArrayList<String>();
  for( FilePath f : $(dir).listDirectories())
    r.add(f.getName());
  return r;
}

代码示例来源:origin: hudson/hudson-2.x

public List<String> listSubDirectories(String dir) throws IOException, InterruptedException {
  List<String> r = new ArrayList<String>();
  for( FilePath f : $(dir).listDirectories())
    r.add(f.getName());
  return r;
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

@Override
public List<String> listSubDirectories(String dir) throws IOException, InterruptedException {
  List<String> r = new ArrayList<String>();
  for (FilePath f : $(dir).listDirectories()) {
    r.add(f.getName());
  }
  return r;
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

public List<String> listSubDirectories(String dir) throws IOException, InterruptedException {
  List<String> r = new ArrayList<String>();
  for( FilePath f : $(dir).listDirectories())
    r.add(f.getName());
  return r;
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

public List<String> listSubDirectories(String dir) throws IOException, InterruptedException {
  List<String> r = new ArrayList<String>();
  for( FilePath f : $(dir).listDirectories())
    r.add(f.getName());
  return r;
}

代码示例来源:origin: jenkinsci/android-emulator-plugin

/**
 * Recursively flags anything that looks like an Android tools executable, as executable.
 *
 * @param toolsDir The top level Android SDK tools directory.
 */
private static final void setPermissions(FilePath toolsDir) throws IOException, InterruptedException {
  for (FilePath dir : toolsDir.listDirectories()) {
    setPermissions(dir);
  }
  for (FilePath f : toolsDir.list(new ToolFileFilter())) {
    f.chmod(0755);
  }
}

代码示例来源:origin: jenkinsci/android-emulator-plugin

toolsSubdir.listDirectories().get(0).moveAllChildrenTo(toolsSubdir);

相关文章