Scalr\Upgrade\UpgradeHandler::checkFilesystemStorage PHP Method

checkFilesystemStorage() public static method

Checks filesystem storage
public static checkFilesystemStorage ( )
    public static function checkFilesystemStorage()
    {
        if (!is_dir(self::FS_STORAGE_PATH)) {
            if (@mkdir(self::FS_STORAGE_PATH, 0777) === false) {
                throw new Exception\UpgradeException(sprintf('Could not create directory "%s". Lack of access permissions to application cache folder.', self::FS_STORAGE_PATH));
            } else {
                file_put_contents(self::FS_STORAGE_PATH . '.htaccess', "Order Deny,Allow\nDeny from all\n");
                chmod(self::FS_STORAGE_PATH . '.htaccess', 0644);
            }
        }
    }