Download the PHP package jenwachter/php-rsync without Composer
On this page you can find all versions of the php package jenwachter/php-rsync. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-rsync
PHP Rsync
A simple rsync library for PHP, able to perform local, remote, and Akamai NetStorage syncs. Note that this library is not all-inclusive of everything that can be done with the rsync command.
- Requirements
- Installation
- Usage
Requirements
- PHP >= 8.0
Installation
To install the library, you will need to use Composer in your project.
Usage
Create a connection
To start using the library, you must first create a connection. This connection is then passed to the Rsync
class.
`
There are three types of connections:
Local
Use this type of connection when the source and destination are on the same machine. Example: transferring files from one directory to another on your local machine.
`
Remote
Use this type of connection when the source and destination are different machines. Example: transferring files from your local machine to a remote machine.
`
Alternatively, you can use a password for authentication by passing ['password' => 'your_password']
as the fifth parameter.
Akamai
Use this type of connection when the destination is Akamai NetStorage. For details on how to connect to NetStorage, see the NetStorage Rsync documentation
`
Perform rsync transfers
Available options
- archive: Boolean. Adds
--archive
flag, if true. Default: true - compress: Boolean. Adds
--compress
flag, if true. Default: true - cwd: String. Changes the current working directory prior to running the
rsync
command. Default: null - delete: Boolean. Adds
--delete
flag, if true. Default: false - dryrun: Boolean. Adds
--dry-run
and--verbose
flags, if true. Default: false - exclude: Array|String. If a string is passed, adds
--exclude="<string>"
flag. if an array of strings is passed, adds multiple--exclude="<string>"
flags. Default: null - include: Array|String. If a string is passed, adds
--include="<string>"
flag. if an array of strings is passed, adds multiple--include="<string>"
flags. Default: null - relative: Boolean. Adds
--relative
flag, if true. Default: false