diff options
author | Sara Golemon <pollita@php.net> | 2003-11-28 23:25:28 +0000 |
---|---|---|
committer | Sara Golemon <pollita@php.net> | 2003-11-28 23:25:28 +0000 |
commit | 026d4c9e4cec8cb3f03c311b90f05241f2d70455 (patch) | |
tree | e563b6f3699eb94168362c8f00fb1c4d80506e7a /main/php_streams.h | |
parent | 6d86bb9e40386e4127af4f55b8e8e79864255ca1 (diff) | |
download | php-git-026d4c9e4cec8cb3f03c311b90f05241f2d70455.tar.gz |
Route php_stat() via streams/url_stat API (php_stream_stat_path).
This enables fopen-wrappers support on stat() and related family calls.
Diffstat (limited to 'main/php_streams.h')
-rwxr-xr-x | main/php_streams.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/main/php_streams.h b/main/php_streams.h index 6496018931..fac56a06d1 100755 --- a/main/php_streams.h +++ b/main/php_streams.h @@ -139,7 +139,7 @@ typedef struct _php_stream_wrapper_ops { /* stat a wrapped stream */ int (*stream_stat)(php_stream_wrapper *wrapper, php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC); /* stat a URL */ - int (*url_stat)(php_stream_wrapper *wrapper, char *url, php_stream_statbuf *ssb TSRMLS_DC); + int (*url_stat)(php_stream_wrapper *wrapper, char *url, int flags, php_stream_statbuf *ssb, php_stream_context *context TSRMLS_DC); /* open a "directory" stream */ php_stream *(*dir_opener)(php_stream_wrapper *wrapper, char *filename, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC); @@ -301,8 +301,9 @@ PHPAPI int _php_stream_puts(php_stream *stream, char *buf TSRMLS_DC); PHPAPI int _php_stream_stat(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC); #define php_stream_stat(stream, ssb) _php_stream_stat((stream), (ssb) TSRMLS_CC) -PHPAPI int _php_stream_stat_path(char *path, php_stream_statbuf *ssb TSRMLS_DC); -#define php_stream_stat_path(path, ssb) _php_stream_stat_path((path), (ssb) TSRMLS_CC) +PHPAPI int _php_stream_stat_path(char *path, int flags, php_stream_statbuf *ssb, php_stream_context *context TSRMLS_DC); +#define php_stream_stat_path(path, ssb) _php_stream_stat_path((path), 0, (ssb), NULL TSRMLS_CC) +#define php_stream_stat_path_ex(path, flags, ssb, context) _php_stream_stat_path((path), (flags), (ssb), (context) TSRMLS_CC) PHPAPI php_stream *_php_stream_opendir(char *path, int options, php_stream_context *context STREAMS_DC TSRMLS_DC); #define php_stream_opendir(path, options, context) _php_stream_opendir((path), (options), (context) STREAMS_CC TSRMLS_CC) @@ -316,6 +317,9 @@ PHPAPI int _php_stream_set_option(php_stream *stream, int option, int value, voi #define php_stream_set_chunk_size(stream, size) _php_stream_set_option((stream), PHP_STREAM_OPTION_SET_CHUNK_SIZE, (size), NULL TSRMLS_CC) +/* Flags for url_stat method in wrapper ops */ +#define PHP_STREAM_URL_STAT_LINK 1 + /* change the blocking mode of stream: value == 1 => blocking, value == 0 => non-blocking. */ #define PHP_STREAM_OPTION_BLOCKING 1 |