at line 75

The function accepts filesysteminterface::CHMOD flags in the permission argument
or the user can specify octal values (or any integer if it makes sense). All directories will have
an execution bit appended, if the user group (owner, group or other) has any bit specified.

Return Value

at line 187

Parameters

string

$origin_dir

The origin directory

string

$target_dir

The target directory

Traversable

$iterator

A Traversable instance

array

$options

An array of boolean options Valid options are: - $options['override'] Whether to override an existing file on copy or not (see copy()) - $options['copyonwindows'] Whether to copy files instead of links on Windows (see symlink()) - $options['delete'] Whether to delete files that are not in the source directory (defaults to false)

at line 226

This function determines owner and group whom the file belongs to and user and group of PHP and then set safest possible file permissions.
The function determines owner and group from common.php file and sets the same to the provided file.
The function uses bit fields to build the permissions.
The function sets the appropiate execute bit on directories.

NOTE: The function uses POSIX extension and fileowner()/filegroup() functions. If any of them is disabled, this function tries to build proper permissions, by calling isreadable() and iswritable() functions.