Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-02-10 09:14:25 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-02-10 09:14:25 +0400
commit19385b007ea14a6e4a5d8ba4b53cf12cd150ccc9 (patch)
tree68969dd85303061c6e47b1bcf679cef25ad499a9 /core/Filesystem.php
parent9c9298ef97f777b6f56461f0d1d27733fa7fc63f (diff)
refs #4610 worked on executing cli commands in parallel but not tested yet
Diffstat (limited to 'core/Filesystem.php')
-rw-r--r--core/Filesystem.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/Filesystem.php b/core/Filesystem.php
index af1bdfc8a1..f865e071c8 100644
--- a/core/Filesystem.php
+++ b/core/Filesystem.php
@@ -294,4 +294,18 @@ class Filesystem
self::copy($source, $target, $excludePhp);
}
}
+
+ public static function createWritableFolderIfNeeded($path)
+ {
+ if (!file_exists($path)) {
+ mkdir($path, 0755, true);
+ }
+ }
+
+ public static function deleteIfExists($file)
+ {
+ if (file_exists($file)) {
+ unlink($file);
+ }
+ }
}