protected function flush()
    {
        echo "\nFlushing directories... ";
        foreach ($this->flushPaths as $dir) {
            $path = $this->basePath . '/' . $dir;
            if (file_exists($path)) {
                $this->flushDirectory($path);
            }
            $this->ensureDirectory($path);
        }
        echo "done\n";
    }