(PHP 4 >= 4.3.2, PHP 5, PHP 7)
streamWrapper::url_stat — Retrieve information about a file
$path
, int $flags
) : arrayThis method is called in response to all stat() related functions, such as:
path
The file path or URL to stat. Note that in the case of a URL, it must be a :// delimited URL. Other URL forms are not supported.
flags
Holds additional flags set by the streams API. It can hold one or more of the following values OR'd together.
Flag | Description |
---|---|
STREAM_URL_STAT_LINK | For resources with the ability to link to other resource (such as an HTTP Location: forward, or a filesystem symlink). This flag specified that only information about the link itself should be returned, not the resource pointed to by the link. This flag is set in response to calls to lstat(), is_link(), or filetype(). |
STREAM_URL_STAT_QUIET | If this flag is set, your wrapper should not raise any errors. If this flag is not set, you are responsible for reporting errors using the trigger_error() function during stating of the path. |
Should return as many elements as stat() does.
Unknown or unavailable values should be set to a rational value
(usually 0
).
锟斤拷锟矫此凤拷锟斤拷失锟杰斤拷锟斤拷锟斤拷
E_WARNING
锟斤拷未实锟街o拷锟斤拷
Note:
锟斤拷锟较凤拷锟斤拷锟斤拷锟斤拷锟侥达拷锟捷革拷锟斤拷锟矫猴拷锟斤拷时锟斤拷锟斤拷锟斤拷 streamWrapper::$context 锟结被锟侥变。