## DirectoryInfo::Delete() method


Removes the directory referred to by the path represented by the current object if the directory is empty.

```cpp
virtual void System::IO::DirectoryInfo::Delete() override
```

## See Also

* Class [DirectoryInfo](../)
* Namespace [System::IO](../../)
* Library [Aspose.PDF for C++](../../../)
## DirectoryInfo::Delete(bool) method


Removes the directory referred to by the path represented by the current object. A parameter specifies if the content of the directory should be recursively removed if the directory is not empty.

```cpp
void System::IO::DirectoryInfo::Delete(bool recursive)
```


| Parameter | Type | Description |
| --- | --- | --- |
| recursive | bool | Specifies if the content of the directory should be recursively removed if it is not empty |

## See Also

* Class [DirectoryInfo](../)
* Namespace [System::IO](../../)
* Library [Aspose.PDF for C++](../../../)
