src/FS/Folder/Editor.php
public static function renameFolder( $sourceFolder, $targetName )
	{
		$targetName	= basename( $targetName );
		if( !self::isFolder( $sourceFolder ) )												//  Source Folder not existing
			throw new RuntimeException( 'Folder "'.$sourceFolder.'" is not existing' );

		$sourcePath	= self::correctPath( dirname( $sourceFolder ) );						//  Path to Source Folder
		if( basename( $sourceFolder ) == $targetName )										//  Source Name and Target name is equal
			return FALSE;
		if( self::isFolder( $sourcePath.$targetName ) )										//  Target Folder is already existing
			throw new RuntimeException( 'Folder "'.$sourcePath.$targetName.'" is already existing' );
		if( FALSE === @rename( $sourceFolder, $sourcePath.$targetName ) )					//  rename Source Folder to Target Folder
			throw new RuntimeException( 'Folder "'.$sourceFolder.'" cannot be renamed to "'.$sourcePath.$targetName.'"' );
		return TRUE;
	}
public static function renameFolder( $sourceFolder, $targetName )
	{
		$targetName	= basename( $targetName );
		if( !self::isFolder( $sourceFolder ) )												//  Source Folder not existing
			throw new RuntimeException( 'Folder "'.$sourceFolder.'" is not existing' );

		$sourcePath	= self::correctPath( dirname( $sourceFolder ) );						//  Path to Source Folder
		if( basename( $sourceFolder ) == $targetName )										//  Source Name and Target name is equal
			return FALSE;
		if( self::isFolder( $sourcePath.$targetName ) )										//  Target Folder is already existing
			throw new RuntimeException( 'Folder "'.$sourcePath.$targetName.'" is already existing' );
		if( FALSE === @rename( $sourceFolder, $sourcePath.$targetName ) )					//  rename Source Folder to Target Folder
			throw new RuntimeException( 'Folder "'.$sourceFolder.'" cannot be renamed to "'.$sourcePath.$targetName.'"' );
		return TRUE;
	}
public static function renameFolder ( $ sourceFolder , $ targetName ) { $ targetName = basename ( $ targetName ) ; if ( ! self :: isFolder ( $ sourceFolder ) ) //  Source Folder not existing throw new RuntimeException ( 'Folder "' . $ sourceFolder . '" is not existing' ) ; $ sourcePath = self :: correctPath ( dirname ( $ sourceFolder ) ) ; //  Path to Source Folder if ( basename ( $ sourceFolder ) == $ targetName ) //  Source Name and Target name is equal return FALSE ; if ( self :: isFolder ( $ sourcePath . $ targetName ) ) //  Target Folder is already existing throw new RuntimeException ( 'Folder "' . $ sourcePath . $ targetName . '" is already existing' ) ; if ( FALSE === @ rename ( $ sourceFolder , $ sourcePath . $ targetName ) ) //  rename Source Folder to Target Folder throw new RuntimeException ( 'Folder "' . $ sourceFolder . '" cannot be renamed to "' . $ sourcePath . $ targetName . '"' ) ; return TRUE ; }
Renames a Folder to another Folder Name.
@access		public
@static
@param		string		$sourceFolder	Folder to rename
@param		string		$targetName		New Name of Folder
@return		bool
Renames a Folder to another Folder Name .