hudson.model.Hudson.getRootDir()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(181)

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

Hudson.getRootDir介绍

暂无

代码示例

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

/**
 * Returns true if there's some data in the fingerprint database.
 */
public boolean isReady() {
  return new File(Hudson.getInstance().getRootDir(),"fingerprints").exists();
}

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

/**
 * Returns true if there's some data in the fingerprint database.
 */
public boolean isReady() {
  return new File(Hudson.getInstance().getRootDir(), "fingerprints").exists();
}

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

/**
 * Gets the directory where Hudson stores user information.
 */
private static File getRootDir() {
  return new File(Hudson.getInstance().getRootDir(), "users");
}

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

/**
 * This is where we locally cache this JDK.
 */
private File getLocalCacheFile(Platform platform, CPU cpu) {
  return new File(Hudson.getInstance().getRootDir(),"cache/jdks/"+platform+"/"+cpu+"/"+id);
}

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

/**
 * Returns true if there's some data in the fingerprint database.
 */
public boolean isReady() {
  return new File(Hudson.getInstance().getRootDir(),"fingerprints").exists();
}

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

/**
 * This is where the log from the remote agent goes.
 */
protected File getLogFile() {
  return new File(Hudson.getInstance().getRootDir(),"slave-"+nodeName+".log");
}

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

@Initializer(after=JOB_LOADED)
  public static void init(Hudson h) throws IOException {
    File userContentDir = new File(h.getRootDir(), "userContent");
    if(!userContentDir.exists()) {
      userContentDir.mkdirs();
      FileUtils.writeStringToFile(new File(userContentDir,"readme.txt"), Messages.Hudson_USER_CONTENT_README());
    }
  }
}

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

@Initializer(after=JOB_LOADED)
  public static void init(Hudson h) throws IOException {
    File userContentDir = new File(h.getRootDir(), "userContent");
    if(!userContentDir.exists()) {
      userContentDir.mkdirs();
      FileUtils.writeStringToFile(new File(userContentDir,"readme.txt"), Messages.Hudson_USER_CONTENT_README());
    }
  }
}

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

/**
 * This is where the retrieved file will be stored.
 */
public TextFile getDataFile() {
  return new TextFile(new File(Hudson.getInstance().getRootDir(),"updates/"+id));
}

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

/**
 * This is where the retrieved file will be stored.
 */
public TextFile getDataFile() {
  return new TextFile(new File(Hudson.getInstance().getRootDir(), "updates/" + id));
}

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

/**
 * {@link NodeMonitor}s are persisted in this file.
 */
private static XmlFile getConfigFile() {
  return new XmlFile(new File(Hudson.getInstance().getRootDir(), "nodeMonitors.xml"));
}

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

/**
 * {@link NodeMonitor}s are persisted in this file.
 */
private static XmlFile getConfigFile() {
  return new XmlFile(new File(Hudson.getInstance().getRootDir(),"nodeMonitors.xml"));
}

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

/**
 * {@link NodeMonitor}s are persisted in this file.
 */
private static XmlFile getConfigFile() {
  return new XmlFile(new File(Hudson.getInstance().getRootDir(),"nodeMonitors.xml"));
}

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

private void process(Hudson h) throws IOException, InterruptedException {
  File jobs = new File(h.getRootDir(), "jobs");
  File[] dirs = jobs.listFiles(DIR_FILTER);
  if(dirs==null)      return;
  for (File dir : dirs) {
    FilePath ws = new FilePath(new File(dir, "workspace"));
    if(shouldBeDeleted(dir.getName(),ws,h)) {
      delete(ws);
    }
  }
}

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

private void process(Hudson h) throws IOException, InterruptedException {
  File jobs = new File(h.getRootDir(), "jobs");
  File[] dirs = jobs.listFiles(DIR_FILTER);
  if(dirs==null)      return;
  for (File dir : dirs) {
    FilePath ws = new FilePath(new File(dir, "workspace"));
    if(shouldBeDeleted(dir.getName(),ws,h)) {
      delete(ws);
    }
  }
}

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

/**
 * Where is the backup file?
 */
public File getBackupFile() {
  return new File(Hudson.getInstance().getRootDir(),"plugins/"+getShortName() + ".bak");
}

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

/**
 * This is where we store the update center data.
 */
private TextFile getDataFile() {
  return new TextFile(new File(Hudson.getInstance().getRootDir(),
                 "updates/" + getId()+".json"));
}

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

/**
 * This is where we store the update center data.
 */
private TextFile getDataFile() {
  return new TextFile(new File(Hudson.getInstance().getRootDir(),
      "updates/" + getId() + ".json"));
}

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

/**
 * This is where we store the update center data.
 */
private TextFile getDataFile() {
  return new TextFile(new File(Hudson.getInstance().getRootDir(),
                 "updates/" + getId()+".json"));
}

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

/**
 * Determines the file name from md5sum.
 */
private static File getFingerprintFile(byte[] md5sum) {
  assert md5sum.length == 16;
  return new File(Hudson.getInstance().getRootDir(),
      "fingerprints/" + Util.toHexString(md5sum, 0, 1) + '/' + Util.toHexString(md5sum, 1, 1) + '/' + Util.toHexString(md5sum, 2, md5sum.length - 2) + ".xml");
}

相关文章

Hudson类方法