diff --git a/src/Umbraco.Core/Services/FileService.cs b/src/Umbraco.Core/Services/FileService.cs index bdae4ce55d..aa722e0133 100644 --- a/src/Umbraco.Core/Services/FileService.cs +++ b/src/Umbraco.Core/Services/FileService.cs @@ -603,6 +603,22 @@ namespace Umbraco.Core.Services } } + public Stream GetXsltFileContentStream(string filepath) + { + using (var repository = RepositoryFactory.CreateXsltFileRepository(UowProvider.GetUnitOfWork())) + { + return repository.GetFileContentStream(filepath); + } + } + + public void SetXsltFileContent(string filepath, Stream content) + { + using (var repository = RepositoryFactory.CreateXsltFileRepository(UowProvider.GetUnitOfWork())) + { + repository.SetFileContent(filepath, content); + } + } + #region Partial Views public IEnumerable GetPartialViewSnippetNames(params string[] filterNames) diff --git a/src/Umbraco.Core/Services/IFileService.cs b/src/Umbraco.Core/Services/IFileService.cs index 3e1cbdd5ff..7d266ba64c 100644 --- a/src/Umbraco.Core/Services/IFileService.cs +++ b/src/Umbraco.Core/Services/IFileService.cs @@ -282,6 +282,20 @@ namespace Umbraco.Core.Services /// The content of the script file. void SetScriptFileContent(string filepath, Stream content); + /// + /// Gets the content of a XSLT file as a stream. + /// + /// The filesystem path to the XSLT file. + /// The content of the XSLT file. + Stream GetXsltFileContentStream(string filepath); + + /// + /// Sets the content of a XSLT file. + /// + /// The filesystem path to the XSLT file. + /// The content of the XSLT file. + void SetXsltFileContent(string filepath, Stream content); + /// /// Gets the content of a macro partial view as a stream. ///