protected function setFile($path = NULL, $template = NULL, array $vars = []) {
    $this->addFile()
      ->path($path)
      ->template($template)
      ->vars($vars);
  }
protected function setFile($path = NULL, $template = NULL, array $vars = []) {
    $this->addFile()
      ->path($path)
      ->template($template)
      ->vars($vars);
  }
protected function setFile ( $ path = NULL , $ template = NULL , array $ vars = [ ] ) { $ this -> addFile ( ) -> path ( $ path ) -> template ( $ template ) -> vars ( $ vars ) ; }
Creates file asset.

@param string $path
Path to the file.
@param string $template
Twig template to render.
@param array $vars
Twig variables.

@deprecated Use self::addFile() or self::addDirectory().
Creates file asset .