english/libraries/joomla/installer/helper.php
/**
	 * Clean up temporary uploaded package and unpacked extension
	 *
	 * @param   string  $package Path to the uploaded package file
	 * @param   string  $resultdir Path to the unpacked extension
	 *
	 * @return  boolean  True on success
	 * @since   11.1
	 */
Clean up temporary uploaded package and unpacked extension
@param   string  $package Path to the uploaded package file
@param   string  $resultdir Path to the unpacked extension

@return  boolean  True on success
@since   11.1
Clean up temporary uploaded package and unpacked extension @param string $package Path to the uploaded package file @param string $resultdir Path to the unpacked extension @return boolean True on success @since 11 . 1
public static function cleanupInstall($package, $resultdir)
	{
		$config = JFactory::getConfig();
				if (is_dir($resultdir)) {
			JFolder::delete($resultdir);
		}
				if (is_file($package)) {
			JFile::delete($package);
		}
		elseif (is_file(JPath::clean($config->get('tmp_path') . '/' . $package)))
		{
			JFile::delete(JPath::clean($config->get('tmp_path') . '/' . $package));
		}
	}
public static function cleanupInstall ( $ package , $ resultdir ) { $ config = JFactory :: getConfig ( ) ; if ( is_dir ( $ resultdir ) ) { JFolder :: delete ( $ resultdir ) ; } if ( is_file ( $ package ) ) { JFile :: delete ( $ package ) ; } elseif ( is_file ( JPath :: clean ( $ config -> get ( 'tmp_path' ) . '/' . $ package ) ) ) { JFile :: delete ( JPath :: clean ( $ config -> get ( 'tmp_path' ) . '/' . $ package ) ) ; } }
Clean up temporary uploaded package and unpacked extension
 @param   string  $package Path to the uploaded package file
 @param   string  $resultdir Path to the unpacked extension
Clean up temporary uploaded package and unpacked extension @param string $package Path to the uploaded package file @param string $resultdir Path to the unpacked extension
// Does the unpacked extension directory exist?
 // Is the package file a valid file?
 // It might also be just a base filename