I want to sync files from source folder to public folder with Phing but the problem is when I use
<copy todir="${libDir}">
<fileset dir="${gitDir}">
<include name="**"></include>
<exclude name="public/**"/>
</fileset>
</copy>
or
<filesync sourcedir="${gitDir}" destinationdir="${libDir}" verbose="true" checksum="true" />
the script doesn't remove the files from ${libDir} which already doesn't exist in ${gitDir}. I don`t want first to remove the hole directory and after that to copy all files. It should works but it will take more time. Do you know how I can sync the folders and remove the nonexistent files?
I found the decision. I just use linux command for that: