function FileRepositoryInterface::loadByUri
Same name in other branches
- 9 core/modules/file/src/FileRepositoryInterface.php \Drupal\file\FileRepositoryInterface::loadByUri()
- 11.x core/modules/file/src/FileRepositoryInterface.php \Drupal\file\FileRepositoryInterface::loadByUri()
Loads the first File entity found with the specified URI.
Parameters
string $uri: The file URI.
Return value
\Drupal\file\FileInterface|null The first file with the matched URI if found, NULL otherwise.
File
-
core/
modules/ file/ src/ FileRepositoryInterface.php, line 127
Class
- FileRepositoryInterface
- Performs file system operations and updates database records accordingly.
Namespace
Drupal\fileCode
public function loadByUri(string $uri) : ?FileInterface;
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.