using System.IO; using System.Threading.Tasks; namespace Robust.Client.UserInterface { /// /// Manager for opening of file dialogs. /// /// /// File dialogs are native to the OS being ran on. /// All operations are asynchronous to prevent locking up the main thread while the user makes his pick. /// public interface IFileDialogManager { /// /// Open a file dialog used for opening a single file. /// /// /// The file stream for the file the user opened. /// if the user cancelled the action. /// Task OpenFile(FileDialogFilters? filters = null); /// /// Open a file dialog used for saving a single file. /// /// /// The file stream the user chose to save to, and whether the file already existed. /// Null if the user cancelled the action. /// Task<(Stream fileStream, bool alreadyExisted)?> SaveFile(FileDialogFilters? filters = null); } }