protected function createFile($filename, $rw = "rb")
{
// Create a filename matrix
$matrix = "";
$depth = strlen($filename);
if ($depth > 5) {
$depth = 5;
}
// Create full path
$path = $this->getVariable("cache_path") . $matrix;
if (!is_dir($path)) {
mkdir($path, 0700, true);
}
// Open the file
if (!file_exists($path . $filename) && $rw == "rb") {
return false;
}
return fopen($path . $filename, $rw);
}