summaryrefslogtreecommitdiff
path: root/classes/diskcache.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-08-13 12:15:43 +0300
committerAndrew Dolgov <[email protected]>2019-08-13 12:15:43 +0300
commit82694bd6ce9a66143c9d2de6c3e74695b6be310e (patch)
tree3757f4bd24c5236b171ddc34eef8ced4c63cc3cb /classes/diskcache.php
parent86308b30eadf1e42a2007b13327c12748f222018 (diff)
add DiskCache.isWritable
Diffstat (limited to 'classes/diskcache.php')
-rw-r--r--classes/diskcache.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/classes/diskcache.php b/classes/diskcache.php
index fdfc46cb1..e6fc7c1b3 100644
--- a/classes/diskcache.php
+++ b/classes/diskcache.php
@@ -10,6 +10,10 @@ class DiskCache {
return $this->dir;
}
+ public function isWritable() {
+ return is_dir($this->dir) && is_writable($this->dir);
+ }
+
public function exists($filename) {
return file_exists($this->getFullPath($filename));
}