/** * <pre> * rsync [options] source [user@]hostname:destination * </pre> * * Where <code>source</code> is a directory on the local file system. <code>source</code> must already exist. */ public static final int rsync(List<String> options, File source, String destination) { String sourcePath = validateRsyncSourceDir(source); return rsyncdirs(options, sourcePath, destination); }
/** * <pre> * rsync source [user@]hostname:destination * </pre> * * Where <code>source</code> is a directory on the local file system. <code>source</code> must already exist. */ public static final int rsyncdirs(File source, String destination) { String sourcePath = validateRsyncSourceDir(source); return rsyncdirs(null, sourcePath, destination); }
/** * <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); }