public function removeFolders($regex = null)
    {
        //argument 1 must be a string or null
        Argument::i()->test(1, 'string', 'null');

        $this->absolute();

        $folders = $this->getFolders($regex);

        if (empty($folders)) {
            return $this;
        }

        //walk directory
        foreach ($folders as $folder) {
            //remove directory
            $folder->remove();
        }

        return $this;
    }