summaryrefslogtreecommitdiffstats
path: root/functions.common.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'functions.common.inc.php')
-rw-r--r--functions.common.inc.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/functions.common.inc.php b/functions.common.inc.php
index 514574e..11bcefc 100644
--- a/functions.common.inc.php
+++ b/functions.common.inc.php
@@ -16,6 +16,13 @@ function generate_uuid() {
);
}
+function getDirectoryContent($path) {
+ if (dir_exists($path)) {
+ return array_diff(scandir($path), array('..', '.'));
+ }
+ return [];
+}
+
function dir_exists($path) {
return file_exists($path) && is_dir($path);
}