diff options
author | Andrew Dolgov <[email protected]> | 2012-08-23 13:03:39 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-08-23 13:03:39 +0400 |
commit | e3449aa1aa388cfa45d92210c06b74fc7b7397e7 (patch) | |
tree | 0a5bd2529087cc4cbe604e2dd25a3b2897c2d1c2 /include/functions.php | |
parent | 9aceda3afc70eba20fa236c46c050b1e63ca07ca (diff) |
add experimental self-updating script
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 14 |
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; + } + ?> |