private static File checkCache(File cache) throws Exception { IO.mkdirs(cache); if (!cache.isDirectory()) throw new IllegalArgumentException("Cannot create directory for " + cache); return cache; }
private static File checkCache(File cache) throws Exception { IO.mkdirs(cache); if (!cache.isDirectory()) throw new IllegalArgumentException("Cannot create directory for " + cache); return cache; }
public URLCache(File root) { this.root = new File(root, "shas"); try { IO.mkdirs(this.root); } catch (IOException e) { throw Exceptions.duck(e); } }
/** * Deletes and creates directories */ public static void initialize(File dir) { try { deleteWithException(dir); mkdirs(dir); } catch (IOException e) { throw new RuntimeException(e); } }
/** * Deletes and creates directories */ public static void initialize(File dir) { try { deleteWithException(dir); mkdirs(dir); } catch (IOException e) { throw new RuntimeException(e); } }
/** * Deletes and creates directories */ public static void initialize(File dir) { try { deleteWithException(dir); mkdirs(dir); } catch (IOException e) { throw new RuntimeException(e); } }
@Override public File getCacheDir(String name) { File dir = new File(hosting, name); try { IO.mkdirs(dir); } catch (IOException e) { throw Exceptions.duck(e); } return dir; }
@Override public File getCacheDir(String name) { File dir = new File(hosting, name); try { IO.mkdirs(dir); } catch (IOException e) { throw Exceptions.duck(e); } return dir; }
private void touch(File dir) throws IOException { IO.mkdirs(dir); IO.store("", new File(dir, GITIGNORE)); }
public void update(InputStream inputStream, String etag, long modified) throws Exception { IO.mkdirs(this.file.getParentFile()); IO.copy(inputStream, this.file); if (modified > 0) { this.file.setLastModified(modified); } update(etag); }
public static Path mkdirs(Path dir) throws IOException { if (Files.isSymbolicLink(dir)) { return mkdirs(Files.readSymbolicLink(dir)); } return Files.createDirectories(dir); }
public static Path mkdirs(Path dir) throws IOException { if (Files.isSymbolicLink(dir)) { return mkdirs(Files.readSymbolicLink(dir)); } return Files.createDirectories(dir); }
public static Path mkdirs(Path dir) throws IOException { if (Files.isSymbolicLink(dir)) { return mkdirs(Files.readSymbolicLink(dir)); } return Files.createDirectories(dir); }
public static Path mkdirs(Path dir) throws IOException { if (Files.isSymbolicLink(dir)) { return mkdirs(Files.readSymbolicLink(dir)); } return Files.createDirectories(dir); }
public File put(String bsn, Version version) throws IOException { File dir = new File(root, bsn); IO.mkdirs(dir); File file = new File(dir, bsn + "-" + version.getMajor() + "." + version.getMinor() + "." + version.getMicro() + ".jar"); return file; }
public void save(File location) throws IOException { if (location.getName() .endsWith(".gz")) compress = true; IO.mkdirs(location.getParentFile()); File tmp = IO.createTempFile(location.getParentFile(), "index", ".xml"); try (OutputStream out = IO.outputStream(tmp)) { save(out); } IO.rename(tmp, location); }
private File getSrcOutput0() throws IOException { File output = getSrcOutput().getAbsoluteFile(); if (!output.exists()) { IO.mkdirs(output); getWorkspace().changedFile(output); } return output; }
private void copyResource(File dir, String path, Resource resource) throws Exception { File to = IO.getBasedFile(dir, path); IO.mkdirs(to.getParentFile()); IO.copy(resource.openInputStream(), to); }
private File getTarget0() throws IOException { File target = getTargetDir(); if (!target.exists()) { IO.mkdirs(target); getWorkspace().changedFile(target); } return target; }
Releaser(MavenRepository home, Revision revision, MavenBackingRepository repo, Properties context) throws Exception { this.home = home; this.revision = revision; this.repo = repo; this.context = context; this.dir = home.toLocalFile(revision.path); IO.delete(this.dir); check(); IO.mkdirs(this.dir); }