// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.IO; namespace osu.Game.Database { public interface IModelFileManager where TModel : class where TFileModel : class { /// /// Replace an existing file with a new version. /// /// The item to operate on. /// The existing file to be replaced. /// The new file contents. void ReplaceFile(TModel model, TFileModel file, Stream contents); /// /// Delete an existing file. /// /// The item to operate on. /// The existing file to be deleted. void DeleteFile(TModel model, TFileModel file); /// /// Add a new file. If the file already exists, it is overwritten. /// /// The item to operate on. /// The new file contents. /// The filename for the new file. void AddFile(TModel model, Stream contents, string filename); } }