Phing CopyTask

Phing is a PHP build tool that you might be familiar with or you might be already using. The official Phing website can be found at http://www.phing.info/ and the initials stand for PHing Is Not GNU make. You can download or install it as a PEAR package and as long as you are a bit familiar with XML it is really easy to learn how to use. So, if you are reading past this point it means that you have actually used Phing before and that you are familiar with its CopyTask for copying individual files or filesets from one location to another.

Recently I was trying a new build file with Phing and came accross an interesting issue. The result of building a target that included copying a previously defined fileset from one location to another had a somewhat unexpected  result. An empty folder that was contained in the source location for which all users had read, write and execute permissions on, was copied accross but the permissions were not kept. I was not receiving any errors and the folder was actually created in the destination folder. As it turns out the version of Phing that I was using did not support copying an empty folder with its permissions to a new location. So if you are having a similar issue do upgrade your  package to the 2.5.0 version of Phing (as of the time of writting this is the latest stable release of Phing on PEAR). You can perform the upgrade quite easily as you would with any other PEAR package.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s