That's the whole point, we should either convert the add-on to use OS.File everywhere or adapt yourself to the way it works currently, using a mixture of both methods is weird.

You can use the empty block to get the editor code and put it into an InputStream which can be easily passed to the ZIP writer.