In an ASP.NET MVC application implementing the repository pattern I am curious if it is appropriate to place non-data related methods in the repository if they still pertain to the general focus of a given repository. For example, suppose a ProductsRepository that has methods for adding and deleting ProductImages which have a partial representation in the database and in the local file store as well. If a ProductImage needs to be deleted we need to delete a row from the database with a repository method and we also need to delete the files associated with that image from the storage medium. Do the IO operations belong in the repository, or is there a more appropriate location?
One thing I have been doing in a situation like the one I just described is providing static methods in my repository which give me the path to a given ProductImage by using the filename stored in the database and a pre-defined directory pattern to programatically generate it. Is this outside the intended use of a repository?
Edit
If such an operation does not belong in the repository, where should something like that go in an MVC pattern? It seems to me that it might make sense to have another layer between the Controller and the Repository that calls the Repository as needed and can be invoked statically from the Controller.