From b713fcfb99dc9c2061fef5e9d0c074aaf8aac4da Mon Sep 17 00:00:00 2001 From: steckbrief Date: Sun, 26 Nov 2017 11:44:14 +0100 Subject: new function dir_exists() introduced --- functions.common.inc.php | 4 ++++ 1 file changed, 4 insertions(+) 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; -- cgit v1.2.3