Пример #1
0
        public void Extract(ZipFileEntryContext entry, string destination, SelfAwareEnumValue <ZipRestoreFilePathsModeEnum> restorePaths = null, string password = null)
        {
            CheckIfOpened();
            var realEntry = entry.GetZipEntry();

            _zip.FlattenFoldersOnExtract = FlattenPathsOnExtraction(restorePaths);
            realEntry.Password           = password;
            realEntry.Extract(destination);
        }
Пример #2
0
        public void Extract(ZipFileEntryContext entry, string destination, SelfAwareEnumValue <ZipRestoreFilePathsModeEnum> restorePaths = null, string password = null)
        {
            CheckIfOpened();
            var realEntry = entry.GetZipEntry();

            _zip.FlattenFoldersOnExtract = FlattenPathsOnExtraction(restorePaths);
            realEntry.Password           = password;

            using (FileStream streamToExtract = new FileStream(Path.Combine(destination, entry.Name), FileMode.Create))
            {
                realEntry.Extract(streamToExtract);
            }
        }