com.twosigma.webtau.cfg.WebTauConfig.getWorkingDir()方法的使用及代码示例

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

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

WebTauConfig.getWorkingDir介绍

暂无

代码示例

代码示例来源:origin: twosigma/webtau

public Path getDocArtifactsPath() {
  return getWorkingDir().resolve(docPath.getAsPath());
}

代码示例来源:origin: twosigma/webtau

public static Path getSchemasDir() {
  Path schemasDirPath = schemasDir.getAsPath();
  if (schemasDirPath.isAbsolute()) {
    return schemasDirPath;
  }
  return getCfg().getWorkingDir().resolve(schemasDirPath);
}

代码示例来源:origin: twosigma/webtau

public static String specFullPath() {
  if (specUrl.getAsString().isEmpty()) {
    return "";
  }
  return getCfg().getWorkingDir()
      .resolve(specUrl.getAsString())
      .toString();
}

代码示例来源:origin: twosigma/webtau

private String textContent(String fileOrResourcePath) {
    Path filePath = WebTauConfig.getCfg().getWorkingDir().resolve(fileOrResourcePath);

    boolean hasResource = ResourceUtils.hasResource(fileOrResourcePath);
    boolean hasFile = Files.exists(filePath);

    if (!hasResource && ! hasFile) {
      throw new IllegalArgumentException("Can't find resource \"" + fileOrResourcePath + "\" or " +
          "file \"" + filePath.toAbsolutePath() + "\"");
    }

    return hasResource ?
        ResourceUtils.textContent(fileOrResourcePath) :
        FileUtils.fileTextContent(filePath);
  }
}

代码示例来源:origin: com.twosigma.webtau/webtau-data

private String textContent(String fileOrResourcePath) {
    Path filePath = WebTauConfig.getCfg().getWorkingDir().resolve(fileOrResourcePath);

    boolean hasResource = ResourceUtils.hasResource(fileOrResourcePath);
    boolean hasFile = Files.exists(filePath);

    if (!hasResource && ! hasFile) {
      throw new IllegalArgumentException("Can't find resource \"" + fileOrResourcePath + "\" or " +
          "file \"" + filePath.toAbsolutePath() + "\"");
    }

    return hasResource ?
        ResourceUtils.textContent(fileOrResourcePath) :
        FileUtils.fileTextContent(filePath);
  }
}

代码示例来源:origin: twosigma/webtau

public JavaBasedTest(String id, String name) {
  reportTestEntry = new ReportTestEntry(getCfg().getWorkingDir());
  reportTestEntry.setId(id);
  reportTestEntry.setScenario(name);
}

相关文章