> +import java.io.File;
> +import java.io.FileInputStream;
> +import java.io.FileOutputStream;
> +import java.io.IOException;
> +
> +import static com.google.common.base.Preconditions.checkArgument;
> +import static com.google.common.collect.Iterables.getLast;
> +
> +/**
> + * @author Andrea Turli
> + */
> +public class Archives {
> +
> + public static File tar(File baseDir, String archivePath) throws
> IOException {
> + // Check that the directory is a directory, and get its contents
> + checkArgument(baseDir.isDirectory(), baseDir + " is not a directory");
Use better the form `checkArgument(baseDir.isDirectory(), "%s is not a
directory", baseDir)`.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/57/files#r11265644