]> granicus.if.org Git - php/commit
Implement persistent plain file streams.
authorWez Furlong <wez@php.net>
Tue, 18 Mar 2003 23:37:54 +0000 (23:37 +0000)
committerWez Furlong <wez@php.net>
Tue, 18 Mar 2003 23:37:54 +0000 (23:37 +0000)
commit86fb577d591b1b3f6fb5d752ba3912bcb6f6a704
treeb54835962c33111ab65bd4634ecde9d6e685fdbd
parent6a8765100606837933bf09ec7bde70e01b36cca9
Implement persistent plain file streams.

Usage:

php_stream *stream = php_stream_fopen("/path/to/file", "r+b", NULL,
STREAM_OPEN_PERSISTENT | ENFORCE_SAFE_MODE | REPORT_ERRORS);

the filename and mode are combined to form the hash key for the persistent
list; they must be identical for this same stream to be returned again in the
next request.

Calling php_stream_close() on a persistent stream *will* close it, as is
usual with all persistent resources in PHP/ZE.

This is deliberately *not* exposed to user-space PHP at this time.
ext/standard/php_fopen_wrapper.c
main/php_streams.h
main/streams/php_stream_plain_wrapper.h
main/streams/plain_wrapper.c