#define IS_ABLE_CHECK(__t) ((__t) == FS_IS_R || (__t) == FS_IS_W || (__t) == FS_IS_X)
#define IS_ACCESS_CHECK(__t) (IS_ABLE_CHECK(type) || (__t) == FS_EXISTS)
+PHPAPI void php_u_stat(zend_uchar filename_type, const zstr filename, php_stat_len filename_length, int type, php_stream_context *context, zval *return_value TSRMLS_DC) /* {{{ */
+{
+ char *fn;
+
+ if (filename_type == IS_STRING) {
+ php_stat(filename.s, filename_length, type, return_value TSRMLS_CC);
+ } else {
+ if (FAILURE == php_stream_path_encode(NULL, &fn, &filename_length, filename.u, filename_length, REPORT_ERRORS, context)) {
+ RETURN_FALSE;
+ }
+ php_stat(filename.s, filename_length, type, return_value TSRMLS_CC);
+ efree(fn);
+ }
+}
+/* }}} */
+
/* {{{ php_stat
*/
PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int type, zval *return_value TSRMLS_DC)
#endif
PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int type, zval *return_value TSRMLS_DC);
+PHPAPI void php_u_stat(zend_uchar filename_type, const zstr filename, php_stat_len filename_length, int type, php_stream_context *context, zval *return_value TSRMLS_DC);
/* Switches for various filestat functions: */
#define FS_PERMS 0