Copy/Clone AudioFormatReader to AudioFormatWriter with meta intact?

I want to open a file and clone it to a new file to which I will be making some edits. I can see you can stream the sample buffer from Reader to Writer with writeFromAudioReader, but what about all the meta? I want an exact clone with all meta data intact.

From the reader I can get all the meta keys, but there doesn’t appear to be any write meta capabilities in AudioFormatWriter.

OK I’ve figured it out, you have to do it via WavAudioFormat, I was hoping that it could be generic but I guess it makes sense that it’s format specific.

EDIT: There is also a format member function ‘replaceMetadataInFile’ which allows overwriting all meta on a named file. Just in case someone comes looking for it in the future.