My goal is to load a file and get its properties.
The method 'Load' does not exist any more in Drupal 8.9 (in the File.php file)
What would be the substitute for this function?
I'm using <theme_name>preprocess_views<field_name> hook to override the output of a view. From here I'm able to retrieve the file id by using
$fid = $variables['field']->getValue($variables['row']);
With the file id, my plan is to load the file and retrieve all its properties, such as label, uri, etc.
Searched the web and all recommendations are to use
however, this method no longer exists Drupal 8.9
How would I go to load this file and get its properties??