GoLang sys_get_temp_dir

request it (408)
GoLang replacement for PHP's sys_get_temp_dir [edit | history]



Do you know a GoLang replacement for PHP's sys_get_temp_dir? Write it!

PHP sys_get_temp_dir

PHP original manual for sys_get_temp_dir [ show | php.net ]

sys_get_temp_dir

(PHP 5 >= 5.2.1, PHP 7)

sys_get_temp_dirReturns directory path used for temporary files

Description

string sys_get_temp_dir ( void )

Returns the path of the directory PHP stores temporary files in by default.

Return Values

Returns the path of the temporary directory.

Examples

Example #1 sys_get_temp_dir() example

<?php
// Create a temporary file in the temporary 
// files directory using sys_get_temp_dir()
$temp_file tempnam(sys_get_temp_dir(), 'Tux');

echo 
$temp_file;
?>

The above example will output something similar to:

C:\Windows\Temp\TuxA318.tmp

See Also