Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard basic_functions.c file.c file.h
Hartmut, This is a very odd name to be using and doesn't follow our naming conventions. Maybe something like sys_get_tmpdir()? Andi At 02:59 AM 5/6/2006, Hartmut Holzgraefe wrote: hholzgraSat May 6 09:59:02 2006 UTC Modified files: /php-srcNEWS /php-src/ext/standard basic_functions.c file.c file.h Log: Added php_get_tmpdir() function that returns the default directory for temporary files (as requested in bug #35380) http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2114r2=1.2115diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2114 php-src/NEWS:1.2115 --- php-src/NEWS:1.2114 Wed May 3 19:52:48 2006 +++ php-src/NEWSSat May 6 09:59:02 2006 @@ -52,6 +52,8 @@ defined using reflection API. (Johannes) - Added second optional parameter to stream_context_create() to set params during context creation. (Sara) +- Added php_get_tmpdir() function that returns the default directory for + temporary files (as requested in bug #35380). (Hartmut) - Fixed bug #36630 (umask not reset at the end of the request). (Ilia) - Fixed bug #34286 (__toString() behavior is inconsistent). (Marcus) http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.769r2=1.770diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.769 php-src/ext/standard/basic_functions.c:1.770 --- php-src/ext/standard/basic_functions.c:1.769Mon Apr 3 13:46:35 2006 +++ php-src/ext/standard/basic_functions.c Sat May 6 09:59:02 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.769 2006/04/03 13:46:35 iliaa Exp $ */ +/* $Id: basic_functions.c,v 1.770 2006/05/06 09:59:02 hholzgra Exp $ */ #include php.h #include php_streams.h @@ -846,6 +846,8 @@ PHP_FE(output_add_rewrite_var, NULL) PHP_FE(output_reset_rewrite_vars, NULL) + PHP_FE(php_get_tmpdir, NULL) + {NULL, NULL, NULL} }; http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/file.c?r1=1.440r2=1.441diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.440 php-src/ext/standard/file.c:1.441 --- php-src/ext/standard/file.c:1.440 Tue May 2 18:23:32 2006 +++ php-src/ext/standard/file.c Sat May 6 09:59:02 2006 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.440 2006/05/02 18:23:32 pollita Exp $ */ +/* $Id: file.c,v 1.441 2006/05/06 09:59:02 hholzgra Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -2555,6 +2555,14 @@ /* }}} */ #endif +/* {{{ proto string php_get_tmpdir() + Returns directory path used for temporary files */ +PHP_FUNCTION(php_get_tmpdir) +{ + RETURN_STRING((char *)php_get_temporary_directory(), 1); +} +/* }}} */ + /* * Local variables: * tab-width: 4 http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/file.h?r1=1.97r2=1.98diff_format=u Index: php-src/ext/standard/file.h diff -u php-src/ext/standard/file.h:1.97 php-src/ext/standard/file.h:1.98 --- php-src/ext/standard/file.h:1.97Fri Jan 13 04:10:32 2006 +++ php-src/ext/standard/file.h Sat May 6 09:59:02 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: file.h,v 1.97 2006/01/13 04:10:32 pajoye Exp $ */ +/* $Id: file.h,v 1.98 2006/05/06 09:59:02 hholzgra Exp $ */ /* Synced with php 3.0 revision 1.30 1999-06-16 [ssb] */ @@ -66,6 +66,7 @@ #endif PHP_NAMED_FUNCTION(php_if_ftruncate); PHP_NAMED_FUNCTION(php_if_fstat); +PHP_FUNCTION(php_get_tmpdir); PHP_MINIT_FUNCTION(user_streams); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard basic_functions.c file.c file.h
On 5/7/06, Andi Gutmans [EMAIL PROTECTED] wrote: Hartmut, This is a very odd name to be using and doesn't follow our naming conventions. Maybe something like sys_get_tmpdir()? I like to go with system_get_temp_dir(). I know it is a long dir but I hate to ask myself, is it sys or system? tmp or temp? :) But I can live with sys_get_temp_dir() --Pierre -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard basic_functions.c file.c file.h
sys_tmpdir()? I vote for sys_ as the prefix, as we've started down that path with sys_getloadavg(). --Wez. On 5/7/06, Pierre [EMAIL PROTECTED] wrote: On 5/7/06, Andi Gutmans [EMAIL PROTECTED] wrote: Hartmut, This is a very odd name to be using and doesn't follow our naming conventions. Maybe something like sys_get_tmpdir()? I like to go with system_get_temp_dir(). I know it is a long dir but I hate to ask myself, is it sys or system? tmp or temp? :) But I can live with sys_get_temp_dir() --Pierre -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard basic_functions.c file.c file.h
On 07.05.2006 21:26, Wez Furlong wrote: sys_tmpdir()? I vote for sys_ as the prefix, as we've started down that path with sys_getloadavg(). Yeah, sys_tmpdir() sounds good. On 5/7/06, Pierre [EMAIL PROTECTED] wrote: On 5/7/06, Andi Gutmans [EMAIL PROTECTED] wrote: Hartmut, This is a very odd name to be using and doesn't follow our naming conventions. Maybe something like sys_get_tmpdir()? I like to go with system_get_temp_dir(). I know it is a long dir but I hate to ask myself, is it sys or system? tmp or temp? :) But I can live with sys_get_temp_dir() --Pierre -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard basic_functions.c file.c file.h
On 5/7/06, Antony Dovgal [EMAIL PROTECTED] wrote: On 07.05.2006 21:26, Wez Furlong wrote: sys_tmpdir()? I vote for sys_ as the prefix, as we've started down that path with sys_getloadavg(). Yeah, sys_tmpdir() sounds good. For the record, php_get_temporary_directory is the internal name. I would choose sys_get_temporary_directory. Or at least respect the CS a bit more and use sys_get_temp_dir(), as decided a while ago :-) --Pierre -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard basic_functions.c file.c file.h
Either of these works for me. At 11:02 AM 5/7/2006, Pierre wrote: On 5/7/06, Antony Dovgal [EMAIL PROTECTED] wrote: On 07.05.2006 21:26, Wez Furlong wrote: sys_tmpdir()? I vote for sys_ as the prefix, as we've started down that path with sys_getloadavg(). Yeah, sys_tmpdir() sounds good. For the record, php_get_temporary_directory is the internal name. I would choose sys_get_temporary_directory. Or at least respect the CS a bit more and use sys_get_temp_dir(), as decided a while ago :-) --Pierre -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php