Skip to content
Greg Bowler edited this page Jul 18, 2023 · 6 revisions

This repository provides intentionally simple one-way synchronisation of two directories. It was originally built to allow a web project's static content to be synchronised into the web root whenever there was a change, and to expose certain directories on the system publicly via symbolic links (for instance, user upload directories).

There are tools like rsync available that are much more rich in features than this humble library, but original purpose of this library was its lack of features - perfect for if you just want to ensure two directory paths are in sync with each other.

The original scope of this library was to be used within PHP.Gt/Build, as a mechanism to automate copying static files into the public web root whenever there were changes detected.

There are two main features:

  1. To recursively copy files from a source to a destination directory in an efficient manner (skipping files that are already present).
  2. Automate creation of symbolic links from a source to a destination.

The tool can be used within PHP or from the command line.


To get started, learn how to use the AbstractSync classes.

Clone this wiki locally