public function LocalStream::url_stat in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/StreamWrapper/LocalStream.php \Drupal\Core\StreamWrapper\LocalStream::url_stat()
- 9 core/lib/Drupal/Core/StreamWrapper/LocalStream.php \Drupal\Core\StreamWrapper\LocalStream::url_stat()
File
- core/
lib/ Drupal/ Core/ StreamWrapper/ LocalStream.php, line 371
Class
- LocalStream
- Defines a Drupal stream wrapper base class for local files.
Namespace
Drupal\Core\StreamWrapperCode
public function url_stat($uri, $flags) {
$this->uri = $uri;
$path = $this
->getLocalPath();
// Suppress warnings if requested or if the file or directory does not
// exist. This is consistent with PHP's plain filesystem stream wrapper.
if ($flags & STREAM_URL_STAT_QUIET || !file_exists($path)) {
return @stat($path);
}
else {
return stat($path);
}
}