mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
parent
bd2060739e
commit
74642d1cf7
@ -154,6 +154,27 @@ class FileCache
|
|||||||
return $this->basedir . '/' . $file;
|
return $this->basedir . '/' . $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepare a sub directory with the given name and return its path
|
||||||
|
*
|
||||||
|
* @param string $name
|
||||||
|
*
|
||||||
|
* @return string|false Returns FALSE in case the cache is not enabled or an error occurred
|
||||||
|
*/
|
||||||
|
public function directory($name)
|
||||||
|
{
|
||||||
|
if (! $this->enabled) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$path = $this->filename($name);
|
||||||
|
if (! is_dir($path) && ! @mkdir($path, octdec('1750'), true)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $path;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the given ETag matches a cached file
|
* Whether the given ETag matches a cached file
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user