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;
    }
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;
    }
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 ; }
Removes a folder given the path and optionally the regular expression

@param string $regex Regular expression to test against

@return Eden\Folder\Index
Removes a folder given the path and optionally the regular expression