``` _outputStreamFactory = outputStreamFactory ?? ((path) => { var directoryPath = Path.GetDirectoryName(path) ?? ""; _ = Directory.CreateDirectory(directoryPath); return new FileStream(path, FileMode.Create); }); ``` https://github.com/dotnet/ClangSharp/blob/03746e376f40a5180af84f4981fa5a3c8ac654e7/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs#L135C55-L135C55