helly           Tue Jan 16 22:10:25 2007 UTC

  Modified files:              
    /php-src/ext/standard       filestat.c php_filestat.h 
  Log:
  - Add php_u_stat()
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/filestat.c?r1=1.155&r2=1.156&diff_format=u
Index: php-src/ext/standard/filestat.c
diff -u php-src/ext/standard/filestat.c:1.155 
php-src/ext/standard/filestat.c:1.156
--- php-src/ext/standard/filestat.c:1.155       Thu Jan 11 01:52:24 2007
+++ php-src/ext/standard/filestat.c     Tue Jan 16 22:10:25 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: filestat.c,v 1.155 2007/01/11 01:52:24 pollita Exp $ */
+/* $Id: filestat.c,v 1.156 2007/01/16 22:10:25 helly Exp $ */
 
 #include "php.h"
 #include "fopen_wrappers.h"
@@ -752,6 +752,22 @@
 #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)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/php_filestat.h?r1=1.29&r2=1.30&diff_format=u
Index: php-src/ext/standard/php_filestat.h
diff -u php-src/ext/standard/php_filestat.h:1.29 
php-src/ext/standard/php_filestat.h:1.30
--- php-src/ext/standard/php_filestat.h:1.29    Mon Jan  1 09:29:32 2007
+++ php-src/ext/standard/php_filestat.h Tue Jan 16 22:10:25 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_filestat.h,v 1.29 2007/01/01 09:29:32 sebastian Exp $ */
+/* $Id: php_filestat.h,v 1.30 2007/01/16 22:10:25 helly Exp $ */
 
 #ifndef PHP_FILESTAT_H
 #define PHP_FILESTAT_H
@@ -88,6 +88,7 @@
 #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

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to