protected function writableFolderCheck()
    {
        $fileName = '/configtester_' . date('Y-m-d-h-i-s') . '.txt';

        $fileSystems = [
            ['name' => 'files', 'folder' => '', 'label' => '<code>files/</code> in the webroot'],
            ['name' => 'extensions', 'folder' => '', 'label' => '<code>extensions/</code> in the webroot'],
            ['name' => 'config', 'folder' => ''],
            ['name' => 'cache', 'folder' => ''],
        ];
        if ($this->app['config']->get('general/database/driver') === 'pdo_sqlite') {
            $fileSystems[] = ['name' => 'app', 'folder' => 'database'];
        }
        $fileSystems = Bag::fromRecursive($fileSystems);

        foreach ($fileSystems as $fileSystem) {
            $contents = $this->isWritable($fileSystem, $fileName);
            if ($contents != 'ok') {
                $folderName = $this->getFoldername($fileSystem);
                $notice = json_encode([
                    'severity' => 1,
                    'notice'   => 'Bolt needs to be able to <strong>write files to</strong> the folder <code>' . $folderName . "</code>, but it doesn't seem to be writable.",
                    'info'     => 'Make sure the folder exists, and is writable to the webserver.',
                ]);
                $this->app['logger.flash']->configuration($notice);
            }
        }
    }