public static void ExtractZipToFreshSubDirectoryAndDelete(string zipFile) { string outputDirectory = FileSystemExtensions.GetFileDirectoryNameFromFileName(zipFile); FileSystemExtensions.ClearDirectory(outputDirectory); using (var fileStream = File.OpenRead(zipFile)) { fileStream.ExtractStreamToFileSystem(new RelativePathFileSystemWriter(outputDirectory)); } File.Delete(zipFile); }