summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2017-11-26 11:44:14 +0100
committersteckbrief <steckbrief@chefmail.de>2017-11-26 11:44:14 +0100
commitb713fcfb99dc9c2061fef5e9d0c074aaf8aac4da (patch)
tree2a6a5e0ac7b14615edebabe71552b5445f6d6c24
parent03cf2a22fe227633cf901dc1d9cf1024b8d07b59 (diff)
new function dir_exists() introduced
-rw-r--r--functions.common.inc.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/functions.common.inc.php b/functions.common.inc.php
index 5be37b6..514574e 100644
--- a/functions.common.inc.php
+++ b/functions.common.inc.php
@@ -16,6 +16,10 @@ function generate_uuid() {
);
}
+function dir_exists($path) {
+ return file_exists($path) && is_dir($path);
+}
+
function format_size($size, $precision = 2) {
$sizes = ['bytes', 'Kb', 'Mb', 'Gb', 'Tb'];
$i = 0;