Drupal 8 - Load file entity by URI

By kenneth, Mon, 06/24/2019 - 21:35
/* @var \Drupal\file\FileInterface[] $files */
$files = \Drupal::entityTypeManager()
  ->getStorage('file')
  ->loadByProperties(['uri' => $uri]);