/** * Returns true if there's some data in the fingerprint database. */ public boolean isReady() { return new File(Hudson.getInstance().getRootDir(),"fingerprints").exists(); }
/** * Returns true if there's some data in the fingerprint database. */ public boolean isReady() { return new File(Hudson.getInstance().getRootDir(), "fingerprints").exists(); }
/** * Gets the directory where Hudson stores user information. */ private static File getRootDir() { return new File(Hudson.getInstance().getRootDir(), "users"); }
/** * 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); }
/** * Returns true if there's some data in the fingerprint database. */ public boolean isReady() { return new File(Hudson.getInstance().getRootDir(),"fingerprints").exists(); }
/** * This is where the log from the remote agent goes. */ protected File getLogFile() { return new File(Hudson.getInstance().getRootDir(),"slave-"+nodeName+".log"); }
@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()); } } }
@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()); } } }
/** * This is where the retrieved file will be stored. */ public TextFile getDataFile() { return new TextFile(new File(Hudson.getInstance().getRootDir(),"updates/"+id)); }
/** * This is where the retrieved file will be stored. */ public TextFile getDataFile() { return new TextFile(new File(Hudson.getInstance().getRootDir(), "updates/" + id)); }
/** * {@link NodeMonitor}s are persisted in this file. */ private static XmlFile getConfigFile() { return new XmlFile(new File(Hudson.getInstance().getRootDir(), "nodeMonitors.xml")); }
/** * {@link NodeMonitor}s are persisted in this file. */ private static XmlFile getConfigFile() { return new XmlFile(new File(Hudson.getInstance().getRootDir(),"nodeMonitors.xml")); }
/** * {@link NodeMonitor}s are persisted in this file. */ private static XmlFile getConfigFile() { return new XmlFile(new File(Hudson.getInstance().getRootDir(),"nodeMonitors.xml")); }
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); } } }
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); } } }
/** * Where is the backup file? */ public File getBackupFile() { return new File(Hudson.getInstance().getRootDir(),"plugins/"+getShortName() + ".bak"); }
/** * This is where we store the update center data. */ private TextFile getDataFile() { return new TextFile(new File(Hudson.getInstance().getRootDir(), "updates/" + getId()+".json")); }
/** * This is where we store the update center data. */ private TextFile getDataFile() { return new TextFile(new File(Hudson.getInstance().getRootDir(), "updates/" + getId() + ".json")); }
/** * This is where we store the update center data. */ private TextFile getDataFile() { return new TextFile(new File(Hudson.getInstance().getRootDir(), "updates/" + getId()+".json")); }
/** * 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"); }