コード例 #1
0
ファイル: Nodes.java プロジェクト: hdpter/jenkins
 /**
  * Returns the directory that the nodes are stored in.
  *
  * @return the directory that the nodes are stored in.
  * @throws IOException
  */
 private File getNodesDir() throws IOException {
   final File nodesDir = new File(jenkins.getRootDir(), "nodes");
   if (!nodesDir.isDirectory() && !nodesDir.mkdirs()) {
     throw new IOException(String.format("Could not mkdirs %s", nodesDir));
   }
   return nodesDir;
 }
コード例 #2
0
ファイル: Nodes.java プロジェクト: hdpter/jenkins
 /**
  * Returns {@code true} if and only if the list of nodes is stored in the legacy location.
  *
  * @return {@code true} if and only if the list of nodes is stored in the legacy location.
  */
 public boolean isLegacy() {
   return !new File(jenkins.getRootDir(), "nodes").isDirectory();
 }