public function delete()
    {
        // Deleting all children
        foreach ($this->getChildren() as $child) {
            $child->delete();
        }

        // Removing the directory itself
        rmdir($this->path);

        return true;
    }
public function delete()
    {
        // Deleting all children
        foreach ($this->getChildren() as $child) {
            $child->delete();
        }

        // Removing the directory itself
        rmdir($this->path);

        return true;
    }
public function delete ( ) { // Deleting all children foreach ( $ this -> getChildren ( ) as $ child ) { $ child -> delete ( ) ; } // Removing the directory itself rmdir ( $ this -> path ) ; return true ; }
Deletes all files in this directory, and then itself.

@return bool
Deletes all files in this directory and then itself .