src/filesystem/Directory.php
public function delete() : void
    {
        $files = $this->getFiles();
        foreach($files as $file) {
            $file->delete();
        }
        rmdir($this->path);
    }
public function delete() : void
    {
        $files = $this->getFiles();
        foreach($files as $file) {
            $file->delete();
        }
        rmdir($this->path);
    }
public function delete ( ) : void { $ files = $ this -> getFiles ( ) ; foreach ( $ files as $ file ) { $ file -> delete ( ) ; } rmdir ( $ this -> path ) ; }
Recursively delete the directory and all its contents.

@throws FileNotFoundException
@throws FilesystemException
@throws \ntentan\utils\exceptions\FileNotReadableException
Recursively delete the directory and all its contents .