TemporaryDirectory allows to create a disposable directory to store temporary files
$ dotnet add package Meziantou.Framework.TemporaryDirectoryCreate 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");