How to access the node title within a field template? I'd like to know the node title within the file link template. How can I get it?

For the current example I use the bootstrap file-link.html.twig template. In it, I have the following variables:

{#
/**
 * @file
 * Theme override for a link to a file.
 *
 * Available variables:
 * - attributes: The HTML attributes for the containing element.
 * - link: A link to the file.
 * - icon: An icon.
 * - icon_only: Flag to display only the icon and not the label.
 * - icon_position: Where an icon should be displayed.
 *
 * @see \Drupal\bootstrap\Plugin\Preprocess\FileLink::preprocessVariables
 */
#}


I dont know if a preprocess function is the correct way to go. I didnt even found a respective hook for drupal 8 for that. I dont even know if this is a field template. But still, the question would also be interesting for other templates than file-link.
He wants to get the node title in the file link template (I assume that is file-link.html.twig). 
You can implement the hook template_preprocess_file_link() in your mytheme.theme file, get the current node and pass its title to twig, something like:

function mytheme_preprocess_file_link(&amp;$variables) {
   $node = \Drupal::request()-&gt;attributes-&gt;get('node');
   $variables['node_title'] = $node-&gt;getTitle();
}


Then, in file-link.html.twig:

{{ node_title }}