/// <summary> /// Gets a file representing a temp file with a random file name. /// </summary> /// <param name="fileSystem">The file system.</param> /// <returns>A temp file.</returns> public static IFile GetTempFile(this IReadOnlyFileSystem fileSystem) { _ = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem)); return(fileSystem.GetTempFile(Path.ChangeExtension(Path.GetRandomFileName(), "tmp"))); }