src/FS/Folder/Editor.php
public function changeGroup( $groupName, $recursive = FALSE )
	{
		if( !$groupName )
			throw new InvalidArgumentException( 'Group is missing' );
		$number	= (int) chgrp( $this->folderName, $groupName );

		if( !$recursive )
			return $number;
		$iterator = new RecursiveIteratorIterator(
			new RecursiveDirectoryIterator( $this->folderName ),
			RecursiveIteratorIterator::SELF_FIRST
		);
		foreach( $iterator as $item )
			$number += (int) chgrp( $item, $groupName );
		return $number;
	}
public function changeGroup( $groupName, $recursive = FALSE )
	{
		if( !$groupName )
			throw new InvalidArgumentException( 'Group is missing' );
		$number	= (int) chgrp( $this->folderName, $groupName );

		if( !$recursive )
			return $number;
		$iterator = new RecursiveIteratorIterator(
			new RecursiveDirectoryIterator( $this->folderName ),
			RecursiveIteratorIterator::SELF_FIRST
		);
		foreach( $iterator as $item )
			$number += (int) chgrp( $item, $groupName );
		return $number;
	}
public function changeGroup ( $ groupName , $ recursive = FALSE ) { if ( ! $ groupName ) throw new InvalidArgumentException ( 'Group is missing' ) ; $ number = ( int ) chgrp ( $ this -> folderName , $ groupName ) ; if ( ! $ recursive ) return $ number ; $ iterator = new RecursiveIteratorIterator ( new RecursiveDirectoryIterator ( $ this -> folderName ) , RecursiveIteratorIterator :: SELF_FIRST ) ; foreach ( $ iterator as $ item ) $ number += ( int ) chgrp ( $ item , $ groupName ) ; return $ number ; }
Sets group of current folder.
@access		public
@param		string		$groupName		Group to set
@param		bool		$recursive		Flag: change nested files and folders,too
@return		bool
Sets group of current folder .