private static void DoPakPack(DirectoryInfo source, FileInfo target, bool mixedCacheBlock) { string tmp = null; try { IEnumerable <KeyValuePair <string, string> > additionalFiles = null; if (mixedCacheBlock) { tmp = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); DoCacheBlockPack(source, new FileInfo(tmp), true); additionalFiles = new[] { new KeyValuePair <string, string> (CacheBlockFile.InitialCacheBlockName, tmp) }; } ZipPakHelper.CreatePak(source.FullName, target.FullName, CacheBlockFile.InitialCacheBlockDirectories, additionalFiles); } finally { if (tmp != null) { try { File.Delete(tmp); } catch { //NOP } } } }
private static void DoPakList(FileInfo source, LocalHeaderField[] localHeader, bool sort) { ZipPakHelper.ListPak(source.FullName, localHeader, sort); }