I'm building a WPF/MVVM application that takes input from the user and generates an output document which it saves in a temporary folder and opens for display in the native application (e.g. MS Word). The document's data is, of course, represented by the model as well as the logic for constructing the actual document (including the interaction with a third-party library that works with document file formats).
My question is: should the actual file save-to-disk operation be in the model? Or should it pass some kind of object (stream, possibly) back to the view model so it can be saved to disk there. Where does something like that belong?