PHP code example of jord-jd / php-file-sync
1. Go to this page and download the library: Download jord-jd/php-file-sync library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jord-jd / php-file-sync example snippets
use League\Flysystem\Adapter\Local;
use League\Flysystem\Filesystem;
$source = new Filesystem(new Local('/path/to/source'));
$destination = new Filesystem(new Local('/path/to/destination'));
use JordJD\FileSync\FileSync;
(new FileSync())
->oneWay()
->from($source)
->to($destination)
->begin();
(new FileSync())
->multiDirectional()
->with($filesystemA)
->with($filesystemB)
->with($filesystemC)
->begin();
bash
composer