/** * <pre> * rsync [options] [user@]hostname:source destination * </pre> * * Where <code>destination</code> is a directory on the local file system. <code>destination</code> will be created if it does not exist */ public static final int rsyncdirs(List<String> options, String source, File destination) { String destinationPath = validateRsyncDestinationDir(destination); return rsyncdirs(options, source, destinationPath); }
/** * <pre> * rsync [user@]hostname:source destination * </pre> * * Where <code>destination</code> is a directory on the local file system. <code>destination</code> will be created if it does not exist */ public static final int rsyncdirs(String source, File destination) { String destinationPath = validateRsyncDestinationDir(destination); return rsyncdirs(null, source, destinationPath); }
/** * <pre> * rsync [options] source destination * </pre> * * Where <code>source</code> and <code>destination</code> are both directories on the local file system. <code>source</code> must already exist. <code>destination</code> will * be created if it does not exist. */ public static final int rsyncdirs(List<String> options, File source, File destination) { String sourcePath = validateRsyncSourceDir(source); String destinationPath = validateRsyncDestinationDir(destination); return rsyncdirs(options, sourcePath, destinationPath); }
/** * <pre> * rsync source destination * </pre> * * Where <code>source</code> and <code>destination</code> are both directories on the local file system. <code>source</code> must already exist. <code>destination</code> will * be created if it does not exist. */ public static final int rsyncdirs(File source, File destination) { String sourcePath = validateRsyncSourceDir(source); String destinationPath = validateRsyncDestinationDir(destination); // Make sure source is a different directory than destination boolean different = !source.equals(destination); Assert.isTrue(different); return rsyncdirs(null, sourcePath, destinationPath); }