synchronizer files
1.0.0
This library makes it easy to synchronize local and remote filesystems.
FilesSynchronizer was developed as backend for the deployment and testing tool Seabreeze. It is using our self-developed Synchronizer library as foundation.
Include the vendor autoloader and use the classes:
namespace AcmeMyApplication;
use FlameCoreSynchronizerFilesFilesSynchronizer;
use FlameCoreSynchronizerFilesLocationLocalFilesLocation;
require 'vendor/autoload.php';Create your Source and Target objects:
$source = new LocalFilesLocation(['dir' => $sourcePath]);
$target = new LocalFilesLocation(['dir' => $targetPath]);Create the FilesSynchronizer and assign the Source and the Target:
$synchronizer = new FilesSynchronizer($source, $target);
$synchronizer->observe($observer); // optionally set an EventObserver objectNow start syncing your files:
$synchronizer->synchronize();
$synchronizer->synchronize(false); // Do not preserve obsolete filesInstall Composer if you don't already have it present on your system.
To install the library, run the following command and you will get the latest development version:
$ php composer.phar require flamecore/synchronizer-files:dev-master
If you want to contribute, please see the CONTRIBUTING file first.
Thanks to the contributors: