public function DrupalLocalStreamWrapper::url_stat
public DrupalLocalStreamWrapper::url_stat($uri, $flags)
Support for stat().
Parameters
$uri: A string containing the URI to get information about.
$flags: A bit mask of STREAM_URL_STAT_LINK and STREAM_URL_STAT_QUIET.
Return value
An array with file status, or FALSE in case of an error - see fstat() for a description of this array.
Overrides StreamWrapperInterface::url_stat
See also
http://php.net/manual/streamwrapper.url-stat.php
File
- includes/stream_wrappers.inc, line 683
- Drupal stream wrapper interface.
Class
- DrupalLocalStreamWrapper
- Drupal stream wrapper base class for local files.
Code
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); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!stream_wrappers.inc/function/DrupalLocalStreamWrapper::url_stat/7.x