using System.Collections.Generic; namespace Umbraco.Core.Packaging { /// /// Used to access an umbraco package file /// Remeber that filenames must be unique /// use "FindDubletFileNames" for sanitycheck /// internal interface IPackageExtraction { /// /// Returns the content of the file with the given filename /// /// Full path to the umbraco 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 void CopyFileFromArchive(string packageFilePath, string fileInPackageName, string destinationfilePath); /// /// Copies a file from package to given destination /// /// Full path to the ubraco package file /// Key: Source file in package. Value: Destination path inclusive file name void CopyFilesFromArchive(string packageFilePath, IEnumerable> sourceDestination); /// /// Check if given list of files can be found in the package /// /// Full path to the umbraco 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 umbraco package file /// list of files that are found more than ones (accross directories) in the package IEnumerable FindDubletFileNames(string packageFilePath); /// /// Reads the given files from archive and returns them as a collection of byte arrays /// /// /// /// IEnumerable ReadFilesFromArchive(string packageFilePath, IEnumerable filesToGet); } }