Back to Patcher class

Method addFile

public \Joomla\CMS\Filesystem\Patcher
addFile
(mixed $filename, mixed $root = JPATH_BASE, mixed $strip = 0)
Add a unified diff file to the patcher
Parameters
  • string $filename Path to the unified diff file
  • string $root The files root path
  • int $strip The number of '/' to strip
Returns
  • \Joomla\CMS\Filesystem\Patcher $this for chaining
Since
  • 3.0.0
Class: Patcher
Project: Joomla

Method addFile - Source code

/**
 * Add a unified diff file to the patcher
 *
 * @param   string   $filename  Path to the unified diff file
 * @param   string   $root      The files root path
 * @param   integer  $strip     The number of '/' to strip
 *
 * @return  Patcher  $this for chaining
 *
 * @since   3.0.0
 */
public function addFile($filename, $root = JPATH_BASE, $strip = 0)
{
    return $this->add(file_get_contents($filename), $root, $strip);
}