Skip to content
Snippets Groups Projects
Commit de862555 authored by Michael Klier's avatar Michael Klier
Browse files

introducing io_mktmpdir()

darcs-hash:20080227221631-23886-1ce689e9616b6dd5d2cc55613b86ddff4e1808be.gz
parent de33a58f
No related branches found
No related tags found
No related merge requests found
......@@ -438,6 +438,26 @@ function io_mkdir_ftp($dir){
return $ok;
}
/**
* Creates a unique temporary directory and returns
* its path.
*
* @author Michael Klier <chi@chimeric.de>
*/
function io_mktmpdir() {
global $conf;
$base = $conf['savedir'].'/tmp/';
$dir = md5(uniqid(rand(), true));
$tmpdir = $base.$dir;
if(io_mkdir_p($tmpdir)) {
return($tmpdir);
} else {
return false;
}
}
/**
* downloads a file from the net and saves it
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment