public void WriteToZipFile(IZipFile zipFile) { var cache = new Cache<string, string>(file => Path.Combine(ZipDirectory, file.PathRelativeTo(RootDirectory))); FileSet.IncludedFilesFor(RootDirectory).Each(cache.FillDefault); FileSet.ExcludedFilesFor(RootDirectory).Each(cache.Remove); cache.Each((file, name) => zipFile.AddFile(file, Path.GetDirectoryName(name))); }
public Guid WriteVersion(IZipFile zipFile) { var versionFile = Path.Combine(Path.GetTempPath(), FubuMvcPackages.VersionFile); var guid = Guid.NewGuid(); _fileSystem.WriteStringToFile(versionFile, guid.ToString()); zipFile.AddFile(versionFile); return guid; }
public void WriteToZipFile(IZipFile zipFile) { var cache = new Cache <string, string>(file => Path.Combine(ZipDirectory, file.PathRelativeTo(RootDirectory))); FileSet.IncludedFilesFor(RootDirectory).Each(cache.FillDefault); FileSet.ExcludedFilesFor(RootDirectory).Each(cache.Remove); cache.Each((file, name) => zipFile.AddFile(file, Path.GetDirectoryName(name))); }
public Guid WriteVersion(IZipFile zipFile) { var versionFile = Path.Combine(Path.GetTempPath(), FubuMvcPackages.VersionFile); var guid = Guid.NewGuid(); _fileSystem.WriteStringToFile(versionFile, guid.ToString()); zipFile.AddFile(versionFile); return(guid); }