# TempDirectory Methods

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [TempDirectory](/reference/api/csharp/aspire.hosting/tempdirectory.md)
- Kind: `Methods`
- Members: `1`

Represents a temporary directory that will be deleted when disposed.

## Dispose

- Name: `Dispose`
- Modifiers: `abstract`

Deletes the temporary directory and all its contents.

```csharp
public abstract class TempDirectory
{
    public abstract void Dispose()
    {
        // ...
    }
}
```
