/** * Creates a zip file from this directory or a file and sends that to the given output stream. */ public void zip(OutputStream os) throws IOException, InterruptedException { zip(os,(FileFilter)null); }
/** * Creates a zip file from this directory or a file and sends that to the given output stream. * * @deprecated as of 1.315. Use {@link #zip(OutputStream)} that has more consistent name. */ @Deprecated public void createZipArchive(OutputStream os) throws IOException, InterruptedException { zip(os); }
public void zip(FilePath dst) throws IOException, InterruptedException { try (OutputStream os = dst.write()) { zip(os); } }
/** * Creates a zip file from this directory or a file and sends that to the * given output stream. * * @deprecated as of 1.315. Use {@link #zip(OutputStream)} that has more * consistent name. */ public void createZipArchive(OutputStream os) throws IOException, InterruptedException { zip(os); }
/** * Creates a zip file from this directory or a file and sends that to the given output stream. */ public void zip(OutputStream os) throws IOException, InterruptedException { zip(os,(FileFilter)null); }
/** * Creates a zip file from this directory or a file and sends that to the given output stream. */ public void zip(OutputStream os) throws IOException, InterruptedException { zip(os,(FileFilter)null); }
/** * Creates a zip file from this directory or a file and sends that to the given output stream. * * @deprecated as of 1.315. Use {@link #zip(OutputStream)} that has more consistent name. */ public void createZipArchive(OutputStream os) throws IOException, InterruptedException { zip(os); }
/** * Creates a zip file from this directory or a file and sends that to the given output stream. */ public void zip(OutputStream os) throws IOException, InterruptedException { zip(os,(FileFilter)null); }
/** * Creates a zip file from this directory or a file and sends that to the * given output stream. */ public void zip(OutputStream os) throws IOException, InterruptedException { zip(os, (FileFilter) null); }
/** * Creates a zip file from this directory or a file and sends that to the given output stream. * * @deprecated as of 1.315. Use {@link #zip(OutputStream)} that has more consistent name. */ public void createZipArchive(OutputStream os) throws IOException, InterruptedException { zip(os); }
/** * Creates a zip file from this directory or a file and sends that to the given output stream. */ public void zip(OutputStream os) throws IOException, InterruptedException { zip(os,(FileFilter)null); }
/** * Creates a zip file from this directory or a file and sends that to the given output stream. * * @deprecated as of 1.315. Use {@link #zip(OutputStream)} that has more consistent name. */ public void createZipArchive(OutputStream os) throws IOException, InterruptedException { zip(os); }
/** * Creates a zip file from this directory or a file and sends that to the given output stream. * * @deprecated as of 1.315. Use {@link #zip(OutputStream)} that has more consistent name. */ @Deprecated public void createZipArchive(OutputStream os) throws IOException, InterruptedException { zip(os); }
public void zip(FilePath dst) throws IOException, InterruptedException { try (OutputStream os = dst.write()) { zip(os); } }
/** * Creates a tar ball. */ public WorkspaceSnapshot snapshot(AbstractBuild<?, ?> build, FilePath ws, String glob, TaskListener listener) throws IOException, InterruptedException { File wss = new File(build.getRootDir(),"workspace.zip"); OutputStream os = new BufferedOutputStream(new FileOutputStream(wss)); try { ws.zip(os,glob); } finally { os.close(); } return new WorkspaceSnapshotImpl(); }
/** * Creates a tar ball. */ public WorkspaceSnapshot snapshot(AbstractBuild<?, ?> build, FilePath ws, String glob, TaskListener listener) throws IOException, InterruptedException { File wss = new File(build.getRootDir(),"workspace.zip"); OutputStream os = new BufferedOutputStream(new FileOutputStream(wss)); try { ws.zip(os,glob); } finally { os.close(); } return new WorkspaceSnapshotImpl(); }
/** * Creates a tar ball. */ public WorkspaceSnapshot snapshot(AbstractBuild<?, ?> build, FilePath ws, String glob, TaskListener listener) throws IOException, InterruptedException { File wss = new File(build.getRootDir(),"workspace.zip"); OutputStream os = new BufferedOutputStream(new FileOutputStream(wss)); try { ws.zip(os,glob); } finally { os.close(); } return new WorkspaceSnapshotImpl(); }
/** * Creates a tar ball. */ public WorkspaceSnapshot snapshot(AbstractBuild<?, ?> build, FilePath ws, String glob, TaskListener listener) throws IOException, InterruptedException { File wss = new File(build.getRootDir(), "workspace.zip"); OutputStream os = new BufferedOutputStream(new FileOutputStream(wss)); try { ws.zip(os, glob); } finally { os.close(); } return new WorkspaceSnapshotImpl(); }
private File getArtifactZip(FilePath artifactLocation) throws IOException, InterruptedException { File resultFile = File.createTempFile("awslambda-", ".zip"); if (!artifactLocation.isDirectory()) { if(artifactLocation.exists()) { logger.log("Copying zip file"); artifactLocation.copyTo(new FileOutputStream(resultFile)); } else { throw new LambdaDeployException("Could not find zipfile or folder."); } } else { logger.log("Zipping folder ..., copying zip file"); artifactLocation.zip(new FileOutputStream(resultFile), new DirScanner.Glob("**", null, false)); } logger.log("File Name: %s%nAbsolute Path: %s%nFile Size: %d", resultFile.getName(), resultFile.getAbsolutePath(), resultFile.length()); return resultFile; } }
private File getLocalFileObject(FilePath rootFileObject) throws Exception { File resultFile = File.createTempFile("awseb-", ".zip"); if (!rootFileObject.isDirectory()) { log("Root File Object is a file. We assume its a zip file, which is okay."); rootFileObject.copyTo(new FileOutputStream(resultFile)); } else { log("Zipping contents of Root File Object (%s) into tmp file %s (includes=%s, excludes=%s)", rootFileObject.getName(), resultFile.getName(), getConfig().getIncludes(), getConfig().getExcludes()); rootFileObject.zip(new FileOutputStream(resultFile), new DirScanner.Glob(getConfig().getIncludes(), getConfig().getExcludes())); } return resultFile; } }