Permalink
Browse files

MFH: sys_get_temp_dir()

  • Loading branch information...
bjori committed Dec 9, 2006
1 parent b8590f9 commit d9f03aac3481c648f8720f55bcecfd38cc6262b1
Showing with 14 additions and 0 deletions.
  1. +1 −0 NEWS
  2. +4 −0 ext/standard/basic_functions.c
  3. +8 −0 ext/standard/file.c
  4. +1 −0 ext/standard/file.h
View
1 NEWS
@@ -3,6 +3,7 @@ PHP NEWS
?? ??? 2007, PHP 5.2.1
- Added a meta tag to phpinfo() output to prevent search engines from indexing
the page. (Ilia)
+- Added new function, sys_get_temp_dir(). (Hartmut)
- Added missing object support to file_put_contents(). (Ilia)
- Changed double-to-string utilities to use BSD implementation. (Dmitry, Tony)
- Updated bundled libcURL to version 7.16.0 in the Windows distro. (Edin)
@@ -1399,6 +1399,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_fnmatch, 0, 0, 2)
ZEND_ARG_INFO(0, flags)
ZEND_END_ARG_INFO()
#endif
+static
+ZEND_BEGIN_ARG_INFO(arginfo_sys_get_temp_dir, 0)
+ZEND_END_ARG_INFO()
/* }}} */
/* {{{ filestat.c */
static
@@ -3762,6 +3765,7 @@ zend_function_entry basic_functions[] = {
PHP_FE(output_add_rewrite_var, arginfo_output_add_rewrite_var)
PHP_FE(output_reset_rewrite_vars, arginfo_output_reset_rewrite_vars)
+ PHP_FE(sys_get_temp_dir, arginfo_sys_get_temp_dir)
{NULL, NULL, NULL}
};
View
@@ -2503,6 +2503,14 @@ PHP_FUNCTION(fnmatch)
/* }}} */
#endif
+/* {{{ proto string sys_get_temp_dir()
+ Returns directory path used for temporary files */
+PHP_FUNCTION(sys_get_temp_dir)
+{
+ RETURN_STRING((char *)php_get_temporary_directory(), 1);
+}
+/* }}} */
+
/*
* Local variables:
* tab-width: 4
View
@@ -66,6 +66,7 @@ PHP_FUNCTION(fnmatch);
#endif
PHP_NAMED_FUNCTION(php_if_ftruncate);
PHP_NAMED_FUNCTION(php_if_fstat);
+PHP_FUNCTION(sys_get_temp_dir);
PHP_MINIT_FUNCTION(user_streams);

0 comments on commit d9f03aa

Please sign in to comment.