From 2d5ffabe1e094aa8c1da92c2bc9128d7a09ae443 Mon Sep 17 00:00:00 2001 From: Claus Date: Tue, 21 Feb 2017 18:15:11 +0100 Subject: [PATCH] adding missing files from last commits. --- src/Umbraco.Core/Deploy/IFileType.cs | 32 +++++++++++++++++++ .../Deploy/IFileTypeCollection.cs | 9 ++++++ 2 files changed, 41 insertions(+) create mode 100644 src/Umbraco.Core/Deploy/IFileType.cs create mode 100644 src/Umbraco.Core/Deploy/IFileTypeCollection.cs diff --git a/src/Umbraco.Core/Deploy/IFileType.cs b/src/Umbraco.Core/Deploy/IFileType.cs new file mode 100644 index 0000000000..f7ab22ffae --- /dev/null +++ b/src/Umbraco.Core/Deploy/IFileType.cs @@ -0,0 +1,32 @@ +using System.IO; +using System.Threading; +using System.Threading.Tasks; + +namespace Umbraco.Core.Deploy +{ + public interface IFileType + { + Stream GetStream(StringUdi udi); + + Task GetStreamAsync(StringUdi udi, CancellationToken token); + + Stream GetChecksumStream(StringUdi udi); + + long GetLength(StringUdi udi); + + void SetStream(StringUdi udi, Stream stream); + + Task SetStreamAsync(StringUdi udi, Stream stream, CancellationToken token); + + bool CanSetPhysical { get; } + + void Set(StringUdi udi, string physicalPath, bool copy = false); + + // this is not pretty as *everywhere* in Deploy we take care of ignoring + // the physical path and always rely on Core's virtual IFileSystem but + // Cloud wants to add some of these files to Git and needs the path... + string GetPhysicalPath(StringUdi udi); + + string GetVirtualPath(StringUdi udi); + } +} diff --git a/src/Umbraco.Core/Deploy/IFileTypeCollection.cs b/src/Umbraco.Core/Deploy/IFileTypeCollection.cs new file mode 100644 index 0000000000..9e2ab137d1 --- /dev/null +++ b/src/Umbraco.Core/Deploy/IFileTypeCollection.cs @@ -0,0 +1,9 @@ +namespace Umbraco.Core.Deploy +{ + public interface IFileTypeCollection + { + IFileType this[string entityType] { get; } + + bool Contains(string entityType); + } +}