summaryrefslogtreecommitdiff
path: root/include/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/functions.php')
-rw-r--r--include/functions.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/functions.php b/include/functions.php
index 957146f1f..69b481ac4 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -5506,4 +5506,18 @@
return null;
}
+
+ function tmpdirname($path, $prefix) {
+ // Use PHP's tmpfile function to create a temporary
+ // directory name. Delete the file and keep the name.
+ $tempname = tempnam($path,$prefix);
+ if (!$tempname)
+ return false;
+
+ if (!unlink($tempname))
+ return false;
+
+ return $tempname;
+ }
+
?>