add DiskCache.isWritable

This commit is contained in:
Andrew Dolgov 2019-08-13 12:15:43 +03:00
parent 86308b30ea
commit 82694bd6ce
1 changed files with 4 additions and 0 deletions

View File

@ -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));
}