Skip to main content
.NETFramework4.7.2net8.0net9.0net10.0

TemporaryDirectory allows to create a disposable directory to store temporary files

Published
Oct 19, 2025
1y ago
Total Downloads
154.2K
154,172

Install

dotnet add package Meziantou.Framework.TemporaryDirectory --version 1.0.21
ProductVersions
.NET
net10.0net8.0net9.0
Other
.NETFramework4.7.2

README

Meziantou.Framework.TemporaryDirectory

Create a unique empty folder that is deleted at the end of the scope.

using var temporaryDirectory = TemporaryDirectory.Create();
temporaryDirectory.CreateEmptyFile("test/demo.txt");
File.WriteAllText(temporaryDirectory.GetFullPath("foo.txt"), "bar");

Changes from Previous Version

v1.0.20v1.0.21
Added Frameworks
net10.0
Added Dependencies

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

Compatibility metadata lists 4 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.