phingofficial/phing — pull request #155 by handautsav (2012-11-08 10:37:39+00:00)
Title: Copy task - PreservePermissions Attribute

CopyTask "preservePermissions" Attribute
------------------------------------------

CopyTask enables a file/directory copying to a new file or directory.

@Ticket
http://www.phing.info/trac/ticket/910

This pull request adds the support for the following attribute:
- preservePermissions (alias preserveMode)

The attribute default state is 'true', providing the file/directory permissions to
be synced on the target file/directory resources. If the attribute is turned off,
then the newly created target file/directory resources will be created according
to the current umask information.

An additional functional adjustment has been done, where the target parent or
empty directory creation was not using the 'mode' attribute value.

The directory creation in the task has been adjusted to create the target directory
with source directory permissions when 'preservePermissions' is true, else the attribute
'mode' is being used.

The CopyTask documentation has been updated with the attribute information.

Thanks,
Utsav