public function setUserRights(\SplFileInfo $targetDir, $user = null, $group = null)
    {

        // Get our system configuration as it contains the user and group to set
        $systemConfiguration = $this->getInitialContext()->getSystemConfiguration();

        // check for the existence of a user
        if ($user == null) {
            $user = $systemConfiguration->getParam('user');
        }

        // check for the existence of a group
        if ($group == null) {
            $group = $systemConfiguration->getParam('group');
        }

        // change the owner for the passed directory
        FileSystem::recursiveChown($targetDir, $user, $group);
    }
public function setUserRights(\SplFileInfo $targetDir, $user = null, $group = null)
    {

        // Get our system configuration as it contains the user and group to set
        $systemConfiguration = $this->getInitialContext()->getSystemConfiguration();

        // check for the existence of a user
        if ($user == null) {
            $user = $systemConfiguration->getParam('user');
        }

        // check for the existence of a group
        if ($group == null) {
            $group = $systemConfiguration->getParam('group');
        }

        // change the owner for the passed directory
        FileSystem::recursiveChown($targetDir, $user, $group);
    }
public function setUserRights ( \ SplFileInfo $ targetDir , $ user = null , $ group = null ) { // Get our system configuration as it contains the user and group to set $ systemConfiguration = $ this -> getInitialContext ( ) -> getSystemConfiguration ( ) ; // check for the existence of a user if ( $ user == null ) { $ user = $ systemConfiguration -> getParam ( 'user' ) ; } // check for the existence of a group if ( $ group == null ) { $ group = $ systemConfiguration -> getParam ( 'group' ) ; } // change the owner for the passed directory FileSystem :: recursiveChown ( $ targetDir , $ user , $ group ) ; }
Will set the owner and group on the passed directory recursively.

@param \SplFileInfo $targetDir The directory to set the rights for
@param string       $user      The user that has to own the passed directory
@param string       $group     The group that has to own the passed directory

@return void
Will set the owner and group on the passed directory recursively .