src/mako/file/FileSystem.php
public function removeDirectory(string $path): bool
	{
		foreach(new FilesystemIterator($path) as $item)
		{
			if($item->isDir())
			{
				$this->removeDirectory($item->getPathname());
			}
			else
			{
				unlink($item->getPathname());
			}
		}

		return rmdir($path);
	}
public function removeDirectory(string $path): bool
	{
		foreach(new FilesystemIterator($path) as $item)
		{
			if($item->isDir())
			{
				$this->removeDirectory($item->getPathname());
			}
			else
			{
				unlink($item->getPathname());
			}
		}

		return rmdir($path);
	}
public function removeDirectory ( string $ path ) : bool { foreach ( new FilesystemIterator ( $ path ) as $ item ) { if ( $ item -> isDir ( ) ) { $ this -> removeDirectory ( $ item -> getPathname ( ) ) ; } else { unlink ( $ item -> getPathname ( ) ) ; } } return rmdir ( $ path ) ; }
Deletes a directory and its contents from disk.

@param  string $path Path to directory
@return bool
Deletes a directory and its contents from disk .