mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
* Add truncate for filesaving If I expose it to content I pretty much always want truncate to be honest. * Update Robust.Client/UserInterface/FileDialogManager.cs --------- Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
22 lines
648 B
C#
22 lines
648 B
C#
using System.IO;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Robust.Client.UserInterface
|
|
{
|
|
/// <summary>
|
|
/// Treats ever file dialog operation as cancelled.
|
|
/// </summary>
|
|
internal sealed class DummyFileDialogManager : IFileDialogManager
|
|
{
|
|
public Task<Stream?> OpenFile(FileDialogFilters? filters = null)
|
|
{
|
|
return Task.FromResult<Stream?>(null);
|
|
}
|
|
|
|
public Task<(Stream fileStream, bool alreadyExisted)?> SaveFile(FileDialogFilters? filters = null, bool truncate = true)
|
|
{
|
|
return Task.FromResult<(Stream fileStream, bool alreadyExisted)?>(null);
|
|
}
|
|
}
|
|
}
|