summaryrefslogtreecommitdiff
path: root/main/php_streams.h
diff options
context:
space:
mode:
Diffstat (limited to 'main/php_streams.h')
-rwxr-xr-xmain/php_streams.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/main/php_streams.h b/main/php_streams.h
index 47fafc8bbd..7a80ee529e 100755
--- a/main/php_streams.h
+++ b/main/php_streams.h
@@ -154,6 +154,12 @@ typedef struct _php_stream_wrapper_ops {
/* Create/Remove directory */
int (*stream_mkdir)(php_stream_wrapper *wrapper, char *url, int mode, int options, php_stream_context *context TSRMLS_DC);
int (*stream_rmdir)(php_stream_wrapper *wrapper, char *url, int options, php_stream_context *context TSRMLS_DC);
+
+ /* Unicode path manipulation -- Leave NULL to use UG(filesystem_encoding_conv) for conversion */
+ int (*path_encode)(php_stream_wrapper *wrapper, char **encpath, int *encpath_len, UChar *path, int path_len,
+ int options, php_stream_context *context TSRMLS_DC);
+ int (*path_decode)(php_stream_wrapper *wrapper, UChar **decpath, int *decpath_len, char *path, int path_len,
+ int options, php_stream_context *context TSRMLS_DC);
} php_stream_wrapper_ops;
struct _php_stream_wrapper {
@@ -367,6 +373,18 @@ 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)
+PHPAPI int _php_stream_path_encode(php_stream_wrapper *wrapper,
+ char **pathenc, int *pathenc_len, UChar *path, int path_len,
+ int options, php_stream_context *context TSRMLS_DC);
+#define php_stream_path_encode(wrapper, pathenc, pathenc_len, path, path_len, options, context) \
+ _php_stream_path_encode((wrapper), (pathenc), (pathenc_len), (path), (path_len), (options), (context) TSRMLS_CC)
+
+PHPAPI int _php_stream_path_decode(php_stream_wrapper *wrapper,
+ char **pathdec, int *pathdec_len, UChar *path, int path_len,
+ int options, php_stream_context *context TSRMLS_DC);
+#define php_stream_path_decode(wrapper, pathdec, pathdec_len, path, path_len, options, context) \
+ _php_stream_path_decode((wrapper), (pathdec), (pathdec_len), (path), (path_len), (options), (context) TSRMLS_CC)
+
END_EXTERN_C()