public function checkDir($location)
{
// As a last resort we can try to create the directory here:
if (!is_dir($location)) {
@mkdir($location, 0777, true);
}
if (!is_dir($location)) {
throw new BootException('The default folder <code>' . $location . "</code> doesn't exist. Make sure it's " . 'present and writable to the user that the web server is using.' . $this->checkSummary());
} elseif (!is_writable($location)) {
throw new BootException('The default folder <code>' . $location . "</code> isn't writable. Make sure it's writable to the user that the web server is using." . $this->checkSummary());
}
}