public static function rmWorkingCopy($path, $recursive = true)
    {
        $returnValue = (bool) false;

        
		
		if (is_file($path)) {
			if(preg_match('/^\//', $path)){
				$returnValue = @unlink($path);
			}
		} else if ($recursive) {
			if (is_dir($path)) {
				$iterator = new DirectoryIterator($path);
				foreach ($iterator as $fileinfo) {
					if (!$fileinfo->isDot()) {
						self::rmWorkingCopy($fileinfo->getPathname(), true);
					}
					unset($fileinfo);
				}
				unset($iterator);
				$returnValue = @rmdir($path);
			}
		}
						
        

        return (bool) $returnValue;
    }
public static function rmWorkingCopy($path, $recursive = true)
    {
        $returnValue = (bool) false;

        
		
		if (is_file($path)) {
			if(preg_match('/^\//', $path)){
				$returnValue = @unlink($path);
			}
		} else if ($recursive) {
			if (is_dir($path)) {
				$iterator = new DirectoryIterator($path);
				foreach ($iterator as $fileinfo) {
					if (!$fileinfo->isDot()) {
						self::rmWorkingCopy($fileinfo->getPathname(), true);
					}
					unset($fileinfo);
				}
				unset($iterator);
				$returnValue = @rmdir($path);
			}
		}
						
        

        return (bool) $returnValue;
    }
public static function rmWorkingCopy ( $ path , $ recursive = true ) { $ returnValue = ( bool ) false ; if ( is_file ( $ path ) ) { if ( preg_match ( '/^\//' , $ path ) ) { $ returnValue = @ unlink ( $ path ) ; } } else if ( $ recursive ) { if ( is_dir ( $ path ) ) { $ iterator = new DirectoryIterator ( $ path ) ; foreach ( $ iterator as $ fileinfo ) { if ( ! $ fileinfo -> isDot ( ) ) { self :: rmWorkingCopy ( $ fileinfo -> getPathname ( ) , true ) ; } unset ( $ fileinfo ) ; } unset ( $ iterator ) ; $ returnValue = @ rmdir ( $ path ) ; } } return ( bool ) $ returnValue ; }
Short description of method rmWorkingCopy

@access public
@author Somsack Sipasseuth, <somsack.sipasseuth@tudor.lu>
@param  string path
@param  boolean recursive
@return boolean
Short description of method rmWorkingCopy