<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Change stream options</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="streamwrapper.stream-lock.html">streamWrapper::stream_lock</a></div> <div class="next" style="text-align: right; float: right;"><a href="streamwrapper.stream-open.html">streamWrapper::stream_open</a></div> <div class="up"><a href="class.streamwrapper.html">streamWrapper</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="streamwrapper.stream-metadata" class="refentry"> <div class="refnamediv"> <h1 class="refname">streamWrapper::stream_metadata</h1> <p class="verinfo">(PHP 5 >= 5.4.0)</p><p class="refpurpose"><span class="refname">streamWrapper::stream_metadata</span> — <span class="dc-title">Change stream options</span></p> </div> <div class="refsect1 description" id="refsect1-streamwrapper.stream-metadata-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">bool</span> <span class="methodname"><strong>streamWrapper::stream_metadata</strong></span> ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$path</code></span> , <span class="methodparam"><span class="type">int</span> <code class="parameter">$option</code></span> , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span> )</div> <p class="para rdfs-comment"> This method is called to set metadata on the stream. It is called when one of the following functions is called on a stream URL: <ul class="simplelist"> <li class="member"> <span class="function"><a href="function.touch.html" class="function">touch()</a></span></li> <li class="member"> <span class="function"><a href="function.chmod.html" class="function">chmod()</a></span></li> <li class="member"> <span class="function"><a href="function.chown.html" class="function">chown()</a></span></li> <li class="member"> <span class="function"><a href="function.chgrp.html" class="function">chgrp()</a></span></li> </ul> Please note that some of these operations may not be available on your system. </p> <blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara">The function is available since PHP 5.4.0.</span> </p></blockquote> </div> <div class="refsect1 parameters" id="refsect1-streamwrapper.stream-metadata-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">path</code></em></span> <dd> <p class="para"> The file path or URL to set metadata. Note that in the case of a URL, it must be a :// delimited URL. Other URL forms are not supported. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">option</code></em></span> <dd> <p class="para"> One of: <ul class="simplelist"> <li class="member"><strong><code>STREAM_META_TOUCH</code></strong> (The method was called in response to <span class="function"><a href="function.touch.html" class="function">touch()</a></span>)</li> <li class="member"><strong><code>STREAM_META_OWNER_NAME</code></strong> (The method was called in response to <span class="function"><a href="function.chown.html" class="function">chown()</a></span> with string parameter)</li> <li class="member"><strong><code>STREAM_META_OWNER</code></strong> (The method was called in response to <span class="function"><a href="function.chown.html" class="function">chown()</a></span>)</li> <li class="member"><strong><code>STREAM_META_GROUP_NAME</code></strong> (The method was called in response to <span class="function"><a href="function.chgrp.html" class="function">chgrp()</a></span>)</li> <li class="member"><strong><code>STREAM_META_GROUP</code></strong> (The method was called in response to <span class="function"><a href="function.chgrp.html" class="function">chgrp()</a></span>)</li> <li class="member"><strong><code>STREAM_META_ACCESS</code></strong> (The method was called in response to <span class="function"><a href="function.chmod.html" class="function">chmod()</a></span>)</li> </ul> </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">value</code></em></span> <dd> <p class="para"> If <em><code class="parameter">option</code></em> is <ul class="simplelist"> <li class="member"><strong><code>STREAM_META_TOUCH</code></strong>: <span class="type"><a href="language.types.array.html" class="type Array">Array</a></span> consisting of two arguments of the <span class="function"><a href="function.touch.html" class="function">touch()</a></span> function.</li> <li class="member"><strong><code>STREAM_META_OWNER_NAME</code></strong> or <strong><code>STREAM_META_GROUP_NAME</code></strong>: The name of the owner user/group as <span class="type"><a href="language.types.string.html" class="type string">string</a></span>.</li> <li class="member"><strong><code>STREAM_META_OWNER</code></strong> or <strong><code>STREAM_META_GROUP</code></strong>: The value owner user/group argument as <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>.</li> <li class="member"><strong><code>STREAM_META_ACCESS</code></strong>: The argument of the <span class="function"><a href="function.chmod.html" class="function">chmod()</a></span> as <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>.</li> </ul> </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-streamwrapper.stream-metadata-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure. If <em><code class="parameter">option</code></em> is not implemented, <strong><code>FALSE</code></strong> should be returned. </p> </div> <div class="refsect1 seealso" id="refsect1-streamwrapper.stream-metadata-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="function"><a href="function.touch.html" class="function" rel="rdfs-seeAlso">touch()</a> - Sets access and modification time of file</span></li> <li class="member"> <span class="function"><a href="function.chmod.html" class="function" rel="rdfs-seeAlso">chmod()</a> - Changes file mode</span></li> <li class="member"> <span class="function"><a href="function.chown.html" class="function" rel="rdfs-seeAlso">chown()</a> - Changes file owner</span></li> <li class="member"> <span class="function"><a href="function.chgrp.html" class="function" rel="rdfs-seeAlso">chgrp()</a> - Changes file group</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="streamwrapper.stream-lock.html">streamWrapper::stream_lock</a></div> <div class="next" style="text-align: right; float: right;"><a href="streamwrapper.stream-open.html">streamWrapper::stream_open</a></div> <div class="up"><a href="class.streamwrapper.html">streamWrapper</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>