Class RSync


  • public class RSync
    extends AbstractBinaryWithTimeout
    Wrapper for rsync binary.
    Author:
    fracpete (fracpete at gmail dot com)
    • Field Detail

      • sources

        protected java.util.List<java.lang.String> sources
        the source path/url.
      • destination

        protected java.lang.String destination
        the destination path/url.
      • verbose

        protected boolean verbose
      • info

        protected java.lang.String info
      • debug

        protected java.lang.String debug
      • msgs2stderr

        protected boolean msgs2stderr
      • quiet

        protected boolean quiet
      • no_motd

        protected boolean no_motd
      • checksum

        protected boolean checksum
      • archive

        protected boolean archive
      • recursive

        protected boolean recursive
      • relative

        protected boolean relative
      • no_implied_dirs

        protected boolean no_implied_dirs
      • backup

        protected boolean backup
      • backup_dir

        protected java.lang.String backup_dir
      • suffix

        protected java.lang.String suffix
      • update

        protected boolean update
      • inplace

        protected boolean inplace
      • append

        protected boolean append
      • append_verify

        protected boolean append_verify
      • dirs

        protected boolean dirs
      • links

        protected boolean links
      • copy_links

        protected boolean copy_links
      • copy_unsafe_links

        protected boolean copy_unsafe_links
      • safe_links

        protected boolean safe_links
      • munge_links

        protected boolean munge_links
      • copy_dirlinks

        protected boolean copy_dirlinks
      • keep_dirlinks

        protected boolean keep_dirlinks
      • hard_links

        protected boolean hard_links
      • perms

        protected boolean perms
      • executability

        protected boolean executability
      • chmod

        protected java.lang.String chmod
      • acls

        protected boolean acls
      • xattrs

        protected boolean xattrs
      • owner

        protected boolean owner
      • group

        protected boolean group
      • devices

        protected boolean devices
      • specials

        protected boolean specials
      • times

        protected boolean times
      • omit_dir_times

        protected boolean omit_dir_times
      • omit_link_times

        protected boolean omit_link_times
      • super_

        protected boolean super_
      • fake_super

        protected boolean fake_super
      • sparse

        protected boolean sparse
      • preallocate

        protected boolean preallocate
      • dry_run

        protected boolean dry_run
      • whole_file

        protected boolean whole_file
      • one_file_system

        protected boolean one_file_system
      • block_size

        protected java.lang.String block_size
      • rsh

        protected java.lang.String rsh
      • rsync_path

        protected java.lang.String rsync_path
      • existing

        protected boolean existing
      • ignore_existing

        protected boolean ignore_existing
      • remove_source_files

        protected boolean remove_source_files
      • delete

        protected boolean delete
      • delete_before

        protected boolean delete_before
      • delete_during

        protected boolean delete_during
      • delete_delay

        protected boolean delete_delay
      • delete_after

        protected boolean delete_after
      • delete_excluded

        protected boolean delete_excluded
      • ignore_missing_args

        protected boolean ignore_missing_args
      • delete_missing_args

        protected boolean delete_missing_args
      • ignore_errors

        protected boolean ignore_errors
      • force

        protected boolean force
      • max_delete

        protected int max_delete
      • max_size

        protected java.lang.String max_size
      • min_size

        protected java.lang.String min_size
      • partial

        protected boolean partial
      • partial_dir

        protected java.lang.String partial_dir
      • delay_updates

        protected boolean delay_updates
      • prune_empty_dirs

        protected boolean prune_empty_dirs
      • numeric_ids

        protected boolean numeric_ids
      • usermap

        protected java.lang.String usermap
      • groupmap

        protected java.lang.String groupmap
      • chown

        protected java.lang.String chown
      • timeout

        protected int timeout
      • contimeout

        protected int contimeout
      • ignore_times

        protected boolean ignore_times
      • remote_option

        protected java.lang.String remote_option
      • size_only

        protected boolean size_only
      • modify_window

        protected int modify_window
      • temp_dir

        protected java.lang.String temp_dir
      • fuzzy

        protected boolean fuzzy
      • compare_dest

        protected java.lang.String[] compare_dest
      • copy_dest

        protected java.lang.String[] copy_dest
      • link_dest

        protected java.lang.String[] link_dest
      • compress

        protected boolean compress
      • compress_level

        protected int compress_level
      • skip_compress

        protected java.lang.String skip_compress
      • cvs_exclude

        protected boolean cvs_exclude
      • include_exclude

        protected java.util.List<java.lang.String> include_exclude
      • files_from

        protected java.lang.String files_from
      • from0

        protected boolean from0
      • protect_args

        protected boolean protect_args
      • address

        protected java.lang.String address
      • port

        protected int port
      • sockopts

        protected java.lang.String sockopts
      • blocking_io

        protected boolean blocking_io
      • stats

        protected boolean stats
      • eight_bit_output

        protected boolean eight_bit_output
      • human_readable

        protected boolean human_readable
      • progress

        protected boolean progress
      • itemize_changes

        protected boolean itemize_changes
      • out_format

        protected java.lang.String out_format
      • log_file

        protected java.lang.String log_file
      • log_file_format

        protected java.lang.String log_file_format
      • password_file

        protected java.lang.String password_file
      • list_only

        protected boolean list_only
      • bwlimit

        protected java.lang.String bwlimit
      • outbuf

        protected char outbuf
      • write_batch

        protected java.lang.String write_batch
      • only_write_batch

        protected java.lang.String only_write_batch
      • read_batch

        protected java.lang.String read_batch
      • protocol

        protected int protocol
      • iconv

        protected java.lang.String iconv
      • checksum_seed

        protected int checksum_seed
      • ipv4

        protected boolean ipv4
      • ipv6

        protected boolean ipv6
      • version

        protected boolean version
      • trust_sender

        protected boolean trust_sender
      • fsync

        protected boolean fsync
      • copy_devices

        protected boolean copy_devices
      • stop_after

        protected java.lang.String stop_after
      • stop_at

        protected java.lang.String stop_at
      • crtimes

        protected boolean crtimes
      • mkpath

        protected boolean mkpath
      • max_alloc

        protected java.lang.String max_alloc
      • early_input

        protected java.lang.String early_input
      • atimes

        protected boolean atimes
      • open_noatime

        protected boolean open_noatime
      • write_devices

        protected boolean write_devices
      • copy_as

        protected java.lang.String copy_as
      • checksum_choice

        protected java.lang.String checksum_choice
      • additional

        protected java.lang.String[] additional
      • sshPass

        protected SshPass sshPass
    • Constructor Detail

      • RSync

        public RSync()
    • Method Detail

      • source

        public RSync source​(java.lang.String value)
        Sets the source path/url.
        Parameters:
        value - the source
      • sources

        public RSync sources​(java.lang.String[] value)
        Sets the source paths/urls.
        Parameters:
        value - the sources
      • sources

        public RSync sources​(java.util.List<java.lang.String> value)
        Sets the source paths/urls.
        Parameters:
        value - the sources
      • getSources

        public java.util.List<java.lang.String> getSources()
        Returns the current source paths/urls.
        Returns:
        the sources, empty list if not set
      • destination

        public RSync destination​(java.lang.String value)
        Sets the destination path/url.
        Parameters:
        value - the destination
        Returns:
        itself
      • getDestination

        public java.lang.String getDestination()
        Returns the current destination path/url.
        Returns:
        the destination, null if not set
      • outputCommandline

        public RSync outputCommandline​(boolean value)
        Sets output commandline flag.
        Overrides:
        outputCommandline in class AbstractBinary
        Parameters:
        value - true if to output commandline
        Returns:
        itself
      • isVerbose

        public boolean isVerbose()
        rsync option: --verbose/-v
      • verbose

        public RSync verbose​(boolean verbose)
        rsync option: --verbose/-v
      • getInfo

        public java.lang.String getInfo()
        rsync option: --info
      • info

        public RSync info​(java.lang.String info)
        rsync option: --info
      • getDebug

        public java.lang.String getDebug()
        rsync option: --debug
      • debug

        public RSync debug​(java.lang.String debug)
        rsync option: --debug
      • isMsgs2stderr

        public boolean isMsgs2stderr()
        rsync option: --msgs2stderr
      • msgs2stderr

        public RSync msgs2stderr​(boolean msgs2stderr)
        rsync option: --msgs2stderr
      • isQuiet

        public boolean isQuiet()
        rsync option: --quiet/-q
      • quiet

        public RSync quiet​(boolean quiet)
        rsync option: --quiet/-q
      • isNoMotd

        public boolean isNoMotd()
        rsync option: --no-motd
      • noMotd

        public RSync noMotd​(boolean no_motd)
        rsync option: --no-motd
      • isChecksum

        public boolean isChecksum()
        rsync option: --checksum/-c
      • checksum

        public RSync checksum​(boolean checksum)
        rsync option: --checksum/-c
      • isArchive

        public boolean isArchive()
        rsync option: --archive/-a
      • archive

        public RSync archive​(boolean archive)
        rsync option: --archive/-a
      • isRecursive

        public boolean isRecursive()
        rsync option: --recursive/-r
      • recursive

        public RSync recursive​(boolean recursive)
        rsync option: --recursive/-r
      • isRelative

        public boolean isRelative()
        rsync option: --relative/-R
      • relative

        public RSync relative​(boolean relative)
        rsync option: --relative/-R
      • isNoImpliedDirs

        public boolean isNoImpliedDirs()
        rsync option: --no-implied-dirs
      • noImpliedDirs

        public RSync noImpliedDirs​(boolean no_implied_dirs)
        rsync option: --no-implied-dirs
      • isBackup

        public boolean isBackup()
        rsync option: --backup/-b
      • backup

        public RSync backup​(boolean backup)
        rsync option: --backup/-b
      • getBackupDir

        public java.lang.String getBackupDir()
        rsync option: --backup-dir
      • backupDir

        public RSync backupDir​(java.lang.String backup_dir)
        rsync option: --backup-dir
      • getSuffix

        public java.lang.String getSuffix()
        rsync option: --suffix
      • suffix

        public RSync suffix​(java.lang.String suffix)
        rsync option: --suffix
      • isUpdate

        public boolean isUpdate()
        rsync option: --update/-u
      • update

        public RSync update​(boolean update)
        rsync option: --update/-u
      • isInplace

        public boolean isInplace()
        rsync option: --inplace
      • inplace

        public RSync inplace​(boolean inplace)
        rsync option: --inplace
      • isAppend

        public boolean isAppend()
        rsync option: --append
      • append

        public RSync append​(boolean append)
        rsync option: --append
      • isAppendVerify

        public boolean isAppendVerify()
        rsync option: --append-verify
      • appendVerify

        public RSync appendVerify​(boolean append_verify)
        rsync option: --append-verify
      • isDirs

        public boolean isDirs()
        rsync option: --dirs/-d
      • dirs

        public RSync dirs​(boolean dirs)
        rsync option: --dirs/-d
      • isLinks

        public boolean isLinks()
        rsync option: --links/-l
      • links

        public RSync links​(boolean links)
        rsync option: --links/-l
      • isCopyLinks

        public boolean isCopyLinks()
        rsync option: --copy-links/-L
      • copyLinks

        public RSync copyLinks​(boolean copy_links)
        rsync option: --copy-links/-L
      • isCopyUnsafeLinks

        public boolean isCopyUnsafeLinks()
        rsync option: --copy-unsafe-links
      • copyUnsafeLinks

        public RSync copyUnsafeLinks​(boolean copy_unsafe_links)
        rsync option: --copy-unsafe-links
      • isSafeLinks

        public boolean isSafeLinks()
        rsync option: --safe-links
      • safeLinks

        public RSync safeLinks​(boolean safe_links)
        rsync option: --safe-links
      • isMungeLinks

        public boolean isMungeLinks()
        rsync option: --munge-links
      • mungeLinks

        public RSync mungeLinks​(boolean munge_links)
        rsync option: --munge-links
      • isCopyDirlinks

        public boolean isCopyDirlinks()
        rsync option: --copy-dirlinks/-k
      • copyDirlinks

        public RSync copyDirlinks​(boolean copy_dirlinks)
        rsync option: --copy-dirlinks/-k
      • isKeepDirlinks

        public boolean isKeepDirlinks()
        rsync option: --keep-dirlinks/-K
      • keepDirlinks

        public RSync keepDirlinks​(boolean keep_dirlinks)
        rsync option: --copy-dirlinks/-K
      • isHardLinks

        public boolean isHardLinks()
        rsync option: --hard-links/-H
      • hardLinks

        public RSync hardLinks​(boolean hard_links)
        rsync option: --hard-links/-H
      • isPerms

        public boolean isPerms()
        rsync option: --perms/-p
      • perms

        public RSync perms​(boolean perms)
        rsync option: --perms/-p
      • isExecutability

        public boolean isExecutability()
        rsync option: --executability/-E
      • executability

        public RSync executability​(boolean executability)
        rsync option: --executability/-E
      • getChmod

        public java.lang.String getChmod()
        rsync option: --chmod
      • chmod

        public RSync chmod​(java.lang.String chmod)
        rsync option: --chmod
      • isAcls

        public boolean isAcls()
        rsync option: --acls/-A
      • acls

        public RSync acls​(boolean acls)
        rsync option: --acls/-A
      • isXattrs

        public boolean isXattrs()
        rsync option: --xattrs/-X
      • xattrs

        public RSync xattrs​(boolean xattrs)
        rsync option: --xattrs/-X
      • isOwner

        public boolean isOwner()
        rsync option: --owner/-o
      • owner

        public RSync owner​(boolean owner)
        rsync option: --owner/-o
      • isGroup

        public boolean isGroup()
        rsync option: --group/-g
      • group

        public RSync group​(boolean group)
        rsync option: --group/-g
      • isDevices

        public boolean isDevices()
        rsync option: --devices
      • devices

        public RSync devices​(boolean devices)
        rsync option: --devices
      • isSpecials

        public boolean isSpecials()
        rsync option: --specials
      • specials

        public RSync specials​(boolean specials)
        rsync option: --specials
      • isTimes

        public boolean isTimes()
        rsync option: --times/-t
      • times

        public RSync times​(boolean times)
        rsync option: --times/-t
      • isOmitDirTimes

        public boolean isOmitDirTimes()
        rsync option: --omit-dir-times/-O
      • omitDirTimes

        public RSync omitDirTimes​(boolean omit_dir_times)
        rsync option: --omit-dir-times/-O
      • isOmitLinkTimes

        public boolean isOmitLinkTimes()
        rsync option: --omit-link-times/-J
      • omitLinkTimes

        public RSync omitLinkTimes​(boolean omit_link_times)
        rsync option: --omit-link-times/-J
      • isSuper_

        public boolean isSuper_()
        rsync option: --super
      • super_

        public RSync super_​(boolean super_)
        rsync option: --super
      • isFakeSuper

        public boolean isFakeSuper()
        rsync option: --fake-super
      • fakeSuper

        public RSync fakeSuper​(boolean fake_super)
        rsync option: --fake-super
      • isSparse

        public boolean isSparse()
        rsync option: --sparse/-S
      • sparse

        public RSync sparse​(boolean sparse)
        rsync option: --sparse/-S
      • isPreallocate

        public boolean isPreallocate()
        rsync option: --preallocate
      • preallocate

        public RSync preallocate​(boolean preallocate)
        rsync option: --preallocate
      • isDryRun

        public boolean isDryRun()
        rsync option: --dry-run/-n
      • dryRun

        public RSync dryRun​(boolean dry_run)
        rsync option: --dry-run/-n
      • isWholeFile

        public boolean isWholeFile()
        rsync option: --whole-file/-W
      • wholeFile

        public RSync wholeFile​(boolean whole_file)
        rsync option: --whole-file/-W
      • isOneFileSystem

        public boolean isOneFileSystem()
        rsync option: --one-file-system/-x
      • oneFileSystem

        public RSync oneFileSystem​(boolean one_file_system)
        rsync option: --one-file-system/-x
      • getBlockSize

        public java.lang.String getBlockSize()
        rsync option: --block-size/-B
      • blockSize

        public RSync blockSize​(java.lang.String block_size)
        rsync option: --block-size/-B
      • getRsh

        public java.lang.String getRsh()
        On Windows: "ssh" will use the built-in ssh binary. Other platforms: use absolute path of binary, eg "/usr/bin/ssh" Empty for plain rsync protocol. rsync option: --rsh/-e
        Returns:
        the rsh binary
      • rsh

        public RSync rsh​(java.lang.String rsh)
        On Windows: use "ssh" to use built-in ssh binary. Other platforms: absolute path of binary, eg "/usr/bin/ssh" Leave empty for plain rsync protocol. rsync option: --rsh/-e
        Parameters:
        rsh - the rsh binary
        Returns:
        itself
      • getRsyncPath

        public java.lang.String getRsyncPath()
        rsync option: --rsync-path
      • rsyncPath

        public RSync rsyncPath​(java.lang.String rsync_path)
        rsync option: --rsync-path
      • isExisting

        public boolean isExisting()
        rsync option: --existing
      • existing

        public RSync existing​(boolean existing)
        rsync option: --existing
      • isIgnoreExisting

        public boolean isIgnoreExisting()
        rsync option: --ignore-existing
      • ignoreExisting

        public RSync ignoreExisting​(boolean ignore_existing)
        rsync option: --ignore-existing
      • isRemoveSourceFiles

        public boolean isRemoveSourceFiles()
        rsync option: --remove-source-files
      • removeSourceFiles

        public RSync removeSourceFiles​(boolean remove_source_files)
        rsync option: --remove-source-files
      • isDelete

        public boolean isDelete()
        rsync option: --delete
      • delete

        public RSync delete​(boolean delete)
        rsync option: --delete
      • isDeleteBefore

        public boolean isDeleteBefore()
        rsync option: --delete-before
      • deleteBefore

        public RSync deleteBefore​(boolean delete_before)
        rsync option: --delete-before
      • isDeleteDuring

        public boolean isDeleteDuring()
        rsync option: --delete-during
      • deleteDuring

        public RSync deleteDuring​(boolean delete_during)
        rsync option: --delete-during
      • isDeleteDelay

        public boolean isDeleteDelay()
        rsync option: --delete-delay
      • deleteDelay

        public RSync deleteDelay​(boolean delete_delay)
        rsync option: --delete-delay
      • isDeleteAfter

        public boolean isDeleteAfter()
        rsync option: --delete-after
      • deleteAfter

        public RSync deleteAfter​(boolean delete_after)
        rsync option: --delete-after
      • isDeleteExcluded

        public boolean isDeleteExcluded()
        rsync option: --delete-excluded
      • deleteExcluded

        public RSync deleteExcluded​(boolean delete_excluded)
        rsync option: --delete-excluded
      • isIgnoreMissingArgs

        public boolean isIgnoreMissingArgs()
        rsync option: --ignore-missing-args
      • ignoreMissingArgs

        public RSync ignoreMissingArgs​(boolean ignore_missing_args)
        rsync option: --ignore-missing-args
      • isDeleteMissingArgs

        public boolean isDeleteMissingArgs()
        rsync option: --delete-missing-args
      • deleteMissingArgs

        public RSync deleteMissingArgs​(boolean delete_missing_args)
        rsync option: --delete-missing-args
      • isIgnoreErrors

        public boolean isIgnoreErrors()
        rsync option: --ignore-errors
      • ignoreErrors

        public RSync ignoreErrors​(boolean ignore_errors)
        rsync option: --ignore-errors
      • isForce

        public boolean isForce()
        rsync option: --force
      • force

        public RSync force​(boolean force)
        rsync option: --force
      • getMaxDelete

        public int getMaxDelete()
        rsync option: --max-delete
      • maxDelete

        public RSync maxDelete​(int max_delete)
        rsync option: --max-delete
      • getMaxSize

        public java.lang.String getMaxSize()
        rsync option: --max-size
      • maxSize

        public RSync maxSize​(java.lang.String max_size)
        rsync option: --max-size
      • getMinSize

        public java.lang.String getMinSize()
        rsync option: --min-size
      • minSize

        public RSync minSize​(java.lang.String min_size)
        rsync option: --min-size
      • isPartial

        public boolean isPartial()
        rsync option: --partial
      • partial

        public RSync partial​(boolean partial)
        rsync option: --partial
      • getPartialDir

        public java.lang.String getPartialDir()
        rsync option: --partial-dir
      • partialDir

        public RSync partialDir​(java.lang.String partial_dir)
        rsync option: --partial-dir
      • isDelayUpdates

        public boolean isDelayUpdates()
        rsync option: --delay-updates
      • delayUpdates

        public RSync delayUpdates​(boolean delay_updates)
        rsync option: --delay-updates
      • isPruneEmptyDirs

        public boolean isPruneEmptyDirs()
        rsync option: --prune-empty-dirs/-m
      • pruneEmptyDirs

        public RSync pruneEmptyDirs​(boolean prune_empty_dirs)
        rsync option: --prune-empty-dirs/-m
      • isNumericIds

        public boolean isNumericIds()
        rsync option: --numeric-ids
      • numericIds

        public RSync numericIds​(boolean numeric_ids)
        rsync option: --numeric-ids
      • getUsermap

        public java.lang.String getUsermap()
        rsync option: --usermap
      • usermap

        public RSync usermap​(java.lang.String usermap)
        rsync option: --usermap
      • getGroupmap

        public java.lang.String getGroupmap()
        rsync option: --groupmap
      • groupmap

        public RSync groupmap​(java.lang.String groupmap)
        rsync option: --groupmap
      • getChown

        public java.lang.String getChown()
        rsync option: --chown
      • chown

        public RSync chown​(java.lang.String chown)
        rsync option: --chown
      • getTimeout

        public int getTimeout()
        rsync option: --timeout
      • timeout

        public RSync timeout​(int timeout)
        rsync option: --timeout
      • getContimeout

        public int getContimeout()
        rsync option: --contimeout
      • contimeout

        public RSync contimeout​(int contimeout)
        rsync option: --contimeout
      • isIgnoreTimes

        public boolean isIgnoreTimes()
        rsync option: --ignore-times/-I
      • ignoreTimes

        public RSync ignoreTimes​(boolean ignore_times)
        rsync option: --ignore-times/-I
      • getRemoteOption

        public java.lang.String getRemoteOption()
        rsync option: --remote-option/-M
      • remoteOption

        public RSync remoteOption​(java.lang.String remote_option)
        rsync option: --remote-option/-M
      • isSizeOnly

        public boolean isSizeOnly()
        rsync option: --size-only
      • sizeOnly

        public RSync sizeOnly​(boolean size_only)
        rsync option: --size-only
      • getModifyWindow

        public int getModifyWindow()
        rsync option: --modify-window
      • modifyWindow

        public RSync modifyWindow​(int modify_window)
        rsync option: --modify-window
      • getTempDir

        public java.lang.String getTempDir()
        rsync option: --temp-dir/-T
      • tempDir

        public RSync tempDir​(java.lang.String temp_dir)
        rsync option: --temp-dir/-T
      • isFuzzy

        public boolean isFuzzy()
        rsync option: --fuzzy/-y
      • fuzzy

        public RSync fuzzy​(boolean fuzzy)
        rsync option: --fuzzy/-y
      • getCompareDest

        public java.lang.String[] getCompareDest()
        rsync option: --compare-dest
      • compareDest

        public RSync compareDest​(java.lang.String... compare_dest)
        rsync option: --compare-dest
      • getCopyDest

        public java.lang.String[] getCopyDest()
        rsync option: --copy-dest
      • copyDest

        public RSync copyDest​(java.lang.String... copy_dest)
        rsync option: --copy-dest
      • getLinkDest

        public java.lang.String[] getLinkDest()
        rsync option: --link-dest
      • linkDest

        public RSync linkDest​(java.lang.String... link_dest)
        rsync option: --link-dest
      • isCompress

        public boolean isCompress()
        rsync option: --compress/-z
      • compress

        public RSync compress​(boolean compress)
        rsync option: --compress/-z
      • getCompressLevel

        public int getCompressLevel()
        rsync option: --compress-level
      • compressLevel

        public RSync compressLevel​(int compress_level)
        rsync option: --compress-level
      • getSkipCompress

        public java.lang.String getSkipCompress()
        rsync option: --skip-compress
      • skipCompress

        public RSync skipCompress​(java.lang.String skip_compress)
        rsync option: --skip-compress
      • isCvsExclude

        public boolean isCvsExclude()
        rsync option: --cvs-exclude/-C
      • cvsExclude

        public RSync cvsExclude​(boolean cvs_exclude)
        rsync option: --cvs-exclude/-C
      • getFilter

        public java.lang.String[] getFilter()
        rsync option: --filter/-f
      • filter

        public RSync filter​(java.lang.String... filter)
        rsync option: --filter/-f
      • includeExcludeSubset

        protected java.lang.String[] includeExcludeSubset​(java.lang.String id)
        Returns a subset of the include/exclude list.
        Parameters:
        id - the subset to retrieve (I, E, IF, EF, F for include, exclude, include-from, exclude-from, filter)
        Returns:
        the subset
      • addIncludeExclude

        protected RSync addIncludeExclude​(java.lang.String id,
                                          java.lang.String... list)
        Adds a list of include/exclude items.
        Parameters:
        id - the subset to retrieve (I, E, IF, EF, F for include, exclude, include-from, exclude-from, filter)
        list - the items to add
        Returns:
        itself
      • getIncludeExclude

        protected java.lang.String[] getIncludeExclude()
      • getExclude

        public java.lang.String[] getExclude()
        rsync option: --exclude
      • exclude

        public RSync exclude​(java.lang.String... exclude)
        rsync option: --exclude
      • getExcludeFrom

        public java.lang.String[] getExcludeFrom()
        rsync option: --exclude-from
      • excludeFrom

        public RSync excludeFrom​(java.lang.String... exclude_from)
        rsync option: --exclude-from
      • getInclude

        public java.lang.String[] getInclude()
        rsync option: --include
      • include

        public RSync include​(java.lang.String... include)
        rsync option: --include
      • getIncludeFrom

        public java.lang.String[] getIncludeFrom()
        rsync option: --include-from
      • includeFrom

        public RSync includeFrom​(java.lang.String... include_from)
        rsync option: --include-from
      • getFilesFrom

        public java.lang.String getFilesFrom()
        rsync option: --files-from
      • filesFrom

        public RSync filesFrom​(java.lang.String files_from)
        rsync option: --files-from
      • isFrom0

        public boolean isFrom0()
        rsync option: --from0/-0
      • from0

        public RSync from0​(boolean from0)
        rsync option: --from0/-0
      • isProtectArgs

        public boolean isProtectArgs()
        rsync option: --protect-args/-s
        NB: --secluded-args starting 3.2.6
      • protectArgs

        public RSync protectArgs​(boolean protect_args)
        rsync option: --protect-args/-s
        NB: --secluded-args starting 3.2.6
      • getAddress

        public java.lang.String getAddress()
        rsync option: --address
      • address

        public RSync address​(java.lang.String address)
        rsync option: --address
      • getPort

        public int getPort()
        rsync option: --port
      • port

        public RSync port​(int port)
        rsync option: --port
      • getSockopts

        public java.lang.String getSockopts()
        rsync option: --sockopts
      • sockopts

        public RSync sockopts​(java.lang.String sockopts)
        rsync option: --sockopts
      • isBlockingIO

        public boolean isBlockingIO()
        rsync option: --blocking-io
      • blockingIO

        public RSync blockingIO​(boolean blocking_io)
        rsync option: --blocking-io
      • isStats

        public boolean isStats()
        rsync option: --stats
      • stats

        public RSync stats​(boolean stats)
        rsync option: --stats
      • isEightBitOutput

        public boolean isEightBitOutput()
        rsync option: --8-bit-output/-8
      • eightBitOutput

        public RSync eightBitOutput​(boolean eight_bit_output)
        rsync option: --8-bit-output/-8
      • isHumanReadable

        public boolean isHumanReadable()
        rsync option: --human-readable/-h
      • humanReadable

        public RSync humanReadable​(boolean human_readable)
        rsync option: --human-readable/-h
      • isProgress

        public boolean isProgress()
        rsync option: --progress
      • progress

        public RSync progress​(boolean progress)
        rsync option: --progress
      • isItemizeChanges

        public boolean isItemizeChanges()
        rsync option: --itemize-changes/-i
      • itemizeChanges

        public RSync itemizeChanges​(boolean itemize_changes)
        rsync option: --itemize-changes/-i
      • getOutFormat

        public java.lang.String getOutFormat()
        rsync option: --out-format
      • outFormat

        public RSync outFormat​(java.lang.String out_format)
        rsync option: --out-format
      • getLogFile

        public java.lang.String getLogFile()
        rsync option: --log-file
      • logFile

        public RSync logFile​(java.lang.String log_file)
        rsync option: --log-file
      • getLogFileFormat

        public java.lang.String getLogFileFormat()
        rsync option: --log-file-format
      • logFileFormat

        public RSync logFileFormat​(java.lang.String log_file_format)
        rsync option: --log-file-format
      • getPasswordFile

        public java.lang.String getPasswordFile()
        rsync option: --password-file
      • passwordFile

        public RSync passwordFile​(java.lang.String password_file)
        rsync option: --password-file
      • isListOnly

        public boolean isListOnly()
        rsync option: --list-only
      • listOnly

        public RSync listOnly​(boolean list_only)
        rsync option: --list-only
      • getBwlimit

        public java.lang.String getBwlimit()
        rsync option: --bwlimit
      • bwlimit

        public RSync bwlimit​(java.lang.String bwlimit)
        rsync option: --bwlimit
      • getOutbuf

        public char getOutbuf()
        rsync option: --outbuf
      • outbuf

        public RSync outbuf​(char outbuf)
        rsync option: --outbuf
      • getWriteBatch

        public java.lang.String getWriteBatch()
        rsync option: --write-batch
      • writeBatch

        public RSync writeBatch​(java.lang.String write_batch)
        rsync option: --write-batch
      • getOnlyWriteBatch

        public java.lang.String getOnlyWriteBatch()
        rsync option: --only-write-batch
      • onlyWriteBatch

        public RSync onlyWriteBatch​(java.lang.String only_write_batch)
        rsync option: --only-write-batch
      • getReadBatch

        public java.lang.String getReadBatch()
        rsync option: --read-batch
      • readBatch

        public RSync readBatch​(java.lang.String read_batch)
        rsync option: --read-batch
      • getProtocol

        public int getProtocol()
        rsync option: --protocol
      • protocol

        public RSync protocol​(int protocol)
        rsync option: --protocol
      • getIconv

        public java.lang.String getIconv()
        rsync option: --iconv
      • iconv

        public RSync iconv​(java.lang.String iconv)
        rsync option: --iconv
      • getChecksumSeed

        public int getChecksumSeed()
        rsync option: --checksum-seed
      • checksumSeed

        public RSync checksumSeed​(int checksum_seed)
        rsync option: --checksum-seed
      • isIpv4

        public boolean isIpv4()
        rsync option: --ipv4/-4
      • ipv4

        public RSync ipv4​(boolean ipv4)
        rsync option: --ipv4/-4
      • isIpv6

        public boolean isIpv6()
        rsync option: --ipv6/-6
      • ipv6

        public RSync ipv6​(boolean ipv6)
        rsync option: --ipv6/-6
      • isVersion

        public boolean isVersion()
        rsync option: --version
      • version

        public RSync version​(boolean version)
        rsync option: --version
      • isTrustSender

        public boolean isTrustSender()
        rsync option: --trust-sender
        Since:
        3.2.5
      • trustSender

        public RSync trustSender​(boolean trust_sender)
        rsync option: --trust-sender
        Since:
        3.2.5
      • isFsync

        public boolean isFsync()
        rsync option: --fsync
        Since:
        3.2.4
      • fsync

        public RSync fsync​(boolean fsync)
        rsync option: --fsync
        Since:
        3.2.4
      • isCopyDevices

        public boolean isCopyDevices()
        rsync option: --copy-devices
        Since:
        3.2.4
      • copyDevices

        public RSync copyDevices​(boolean copy_devices)
        rsync option: --copy-devices
        Since:
        3.2.4
      • getStopAfter

        public java.lang.String getStopAfter()
        rsync option: --stop-after
        Since:
        3.2.3
      • stopAfter

        public RSync stopAfter​(java.lang.String stop_after)
        rsync option: --stop-after
        Since:
        3.2.3
      • getStopAt

        public java.lang.String getStopAt()
        rsync option: --stop-at
        Since:
        3.2.3
      • stopAt

        public RSync stopAt​(java.lang.String stop_at)
        rsync option: --stop-at
        Since:
        3.2.3
      • isCrtimes

        public boolean isCrtimes()
        rsync option: --crtimes
        Since:
        3.2.3
      • crtimes

        public RSync crtimes​(boolean crtimes)
        rsync option: --crtimes
        Since:
        3.2.3
      • isMkpath

        public boolean isMkpath()
        rsync option: --mkpath
        Since:
        3.2.3
      • mkpath

        public RSync mkpath​(boolean mkpath)
        rsync option: --mkpath
        Since:
        3.2.3
      • getMaxAlloc

        public java.lang.String getMaxAlloc()
        rsync option: --max-alloc
        Since:
        3.2.2
      • maxAlloc

        public RSync maxAlloc​(java.lang.String max_alloc)
        rsync option: --max-alloc
        Since:
        3.2.2
      • getEarlyInput

        public java.lang.String getEarlyInput()
        rsync option: --early-input
        Since:
        3.2.1
      • earlyInput

        public RSync earlyInput​(java.lang.String early_input)
        rsync option: --early-input
        Since:
        3.2.1
      • isAtimes

        public boolean isAtimes()
        rsync option: --atimes
        Since:
        3.2.0
      • atimes

        public RSync atimes​(boolean atimes)
        rsync option: --atimes
        Since:
        3.2.0
      • isOpenNoatime

        public boolean isOpenNoatime()
        rsync option: --open-noatime
        Since:
        3.2.0
      • openNoatime

        public RSync openNoatime​(boolean open_noatime)
        rsync option: --open-noatime
        Since:
        3.2.0
      • isWriteDevices

        public boolean isWriteDevices()
        rsync option: --write-devices
        Since:
        3.2.0
      • writeDevices

        public RSync writeDevices​(boolean write_devices)
        rsync option: --write-devices
        Since:
        3.2.0
      • getCopyAs

        public java.lang.String getCopyAs()
        rsync option: --copy-as
        Since:
        3.2.0
      • copyAs

        public RSync copyAs​(java.lang.String copy_as)
        rsync option: --copy-as
        Since:
        3.2.0
      • getChecksumChoice

        public java.lang.String getChecksumChoice()
        rsync option: --checksum-choice
        Since:
        3.1.3
      • checksumChoice

        public RSync checksumChoice​(java.lang.String checksum_choice)
        rsync option: --checksum-choice
        Since:
        3.1.3
      • getAdditional

        public java.lang.String[] getAdditional()
      • additional

        public RSync additional​(java.lang.String... additional)
        Automatically replaces leading "+" and "++" with corresponding "-" and "--".
        Parameters:
        additional - the additional parameters
        Returns:
        itself
      • sshPass

        public RSync sshPass​(SshPass value)
        Sets the sshpass instance to use.
        Parameters:
        value - the instance, use null to not use sshpass
        Returns:
        itselff
      • getSshPass

        public SshPass getSshPass()
        Returns the current sshpass instance in use.
        Returns:
        the instance, null if none set
      • options

        public java.util.List<java.lang.String> options()
                                                 throws java.lang.Exception
        Assembles the arguments for the binary.
        Specified by:
        options in class AbstractBinary
        Returns:
        the options
        Throws:
        java.lang.Exception - if failed to determine binary
      • commandLineArgs

        public java.util.List<java.lang.String> commandLineArgs()
                                                         throws java.lang.Exception
        Assembles the full command-line arguments.
        Specified by:
        commandLineArgs in class AbstractBinary
        Returns:
        the command-line arguments
        Throws:
        java.lang.Exception - if failed to determine binary
        See Also:
        options()
      • description

        protected java.lang.String description()
        Returns a short description for the binary.
        Specified by:
        description in class AbstractBinary
        Returns:
        the description
      • getParser

        protected net.sourceforge.argparse4j.inf.ArgumentParser getParser()
        Configures and returns the commandline parser.
        Overrides:
        getParser in class AbstractBinaryWithTimeout
        Returns:
        the parser
      • setOptions

        protected boolean setOptions​(net.sourceforge.argparse4j.inf.Namespace ns)
        Sets the parsed options.
        Overrides:
        setOptions in class AbstractBinaryWithTimeout
        Parameters:
        ns - the parsed options
        Returns:
        if successfully set
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        For running from the command-line.
        Parameters:
        args - the arguments
        Throws:
        java.lang.Exception