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

        //get the files
        $files = $this->getFiles($regex);

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

        //walk the array
        foreach ($files as $file) {
            //remove everything
            $file->remove();
        }

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

        //get the files
        $files = $this->getFiles($regex);

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

        //walk the array
        foreach ($files as $file) {
            //remove everything
            $file->remove();
        }

        return $this;
    }
public function removeFiles ( $ regex = null ) { //argument 1 must be a string Argument :: i ( ) -> test ( 1 , 'string' , 'null' ) ; //get the files $ files = $ this -> getFiles ( $ regex ) ; if ( empty ( $ files ) ) { return $ this ; } //walk the array foreach ( $ files as $ file ) { //remove everything $ file -> remove ( ) ; } return $ this ; }
Removes files given the path and optionally a regular expression

@param string|null regular expression

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