From 5d3d2e933173becd5712f64ff253ae4a177d14f0 Mon Sep 17 00:00:00 2001 From: jakobdyrby Date: Fri, 9 May 2014 13:32:26 +0200 Subject: [PATCH] added comments to IUnpackHelper --- src/Umbraco.Core/Packaging/IUnpackHelper.cs | 35 +++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/Umbraco.Core/Packaging/IUnpackHelper.cs b/src/Umbraco.Core/Packaging/IUnpackHelper.cs index 1c51c10cba..2f65bc8335 100644 --- a/src/Umbraco.Core/Packaging/IUnpackHelper.cs +++ b/src/Umbraco.Core/Packaging/IUnpackHelper.cs @@ -2,11 +2,46 @@ namespace Umbraco.Core.Packaging { + /// + /// Used to access an umbraco package file + /// Remeber that filenames must be unique + /// use "FindDubletFileNames" for sanitycheck + /// public interface IUnpackHelper { + /// + /// Returns the content of the file with the given filename + /// + /// Full path to the ubraco package file + /// filename of the file for wich to get the text content + /// this is the relative directory for the location of the file in the package + /// I dont know why umbraco packages contains directories in the first place?? + /// text content of the file string ReadTextFileFromArchive(string packageFilePath, string fileToRead, out string directoryInPackage); + + /// + /// Copies a file from package to given destination + /// + /// Full path to the ubraco package file + /// filename of the file to copy + /// destination path (including destination filename) + /// True a file was overwritten bool CopyFileFromArchive(string packageFilePath, string fileInPackageName, string destinationfilePath); + + /// + /// Check if given list of files can be found in the package + /// + /// Full path to the ubraco package file + /// a list of files you would like to find in the package + /// a subset if any of the files in "expectedFiles" that could not be found in the package IEnumerable FindMissingFiles(string packageFilePath, IEnumerable expectedFiles); + + + /// + /// Sanitycheck - should return en empty collection if package is valid + /// + /// Full path to the ubraco package file + /// list of files that can are found more than ones (accross directories) in the package IEnumerable FindDubletFileNames(string packageFilePath); }