rfc:streammetadata
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:streammetadata [2011/03/14 03:53] – stas | rfc:streammetadata [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Request for Comments: | + | ====== Request for Comments: |
* Version: 1.0 | * Version: 1.0 | ||
* Date: 2011-03-13 | * Date: 2011-03-13 | ||
* Author: Stas Malyshev < | * Author: Stas Malyshev < | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
+ | * Patch: http:// | ||
====== Purpose ====== | ====== Purpose ====== | ||
Line 33: | Line 34: | ||
* For PHP_STREAM_META_OWNER_NAME, | * For PHP_STREAM_META_OWNER_NAME, | ||
* For all the rest - long * | * For all the rest - long * | ||
+ | |||
+ | The return value is 0 on failure, non-0 on success. | ||
====== Userspace part ====== | ====== Userspace part ====== | ||
Line 47: | Line 50: | ||
* For all the rest - integer | * For all the rest - integer | ||
+ | The return value is true on success, false on failure. The stream implementor has to decide what to do with unknown/ | ||
====== Examples ====== | ====== Examples ====== | ||
+ | |||
+ | Virtual stream usage (mostly as before): | ||
+ | <code php> | ||
+ | <?php | ||
+ | require_once ' | ||
+ | VirtualStream:: | ||
+ | mkdir(" | ||
+ | unlink(" | ||
+ | var_dump(stat(" | ||
+ | touch(" | ||
+ | var_dump(stat(" | ||
+ | file_put_contents(" | ||
+ | chmod(" | ||
+ | var_dump(stat(" | ||
+ | $f = fopen(" | ||
+ | while($l = fgets($f)) { | ||
+ | echo "== $l"; | ||
+ | } | ||
+ | fclose($f); | ||
+ | $d = opendir(" | ||
+ | while($de = readdir($d)) { | ||
+ | var_dump($de); | ||
+ | } | ||
+ | closedir($d); | ||
+ | </ | ||
Virtual stream definition: | Virtual stream definition: | ||
Line 232: | Line 261: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | ====== TODO ====== | ||
+ | ch{own|mod}() functions are not defined on Netware and defined, but not implemented on Windows. While this API does not limit its implementation to any particular set of features, currently it follows the existing API implementation, | ||
rfc/streammetadata.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1