Open nandhakumargdr opened 2 years ago
// Select full path to archive file with 7z extension.
NSString * archivePath =
// 1.1 Create and hold strongly reader object. self.reader = [[LzmaSDKObjCReader alloc] initWithFileURL:[NSURL fileURLWithPath:archivePath]]; // 1.2 Or create with predefined archive type if path doesn't containes suitable extension self.reader = [[LzmaSDKObjCReader alloc] initWithFileURL:[NSURL fileURLWithPath:archivePath] andType:LzmaSDKObjCFileType7z];
// Optionaly: assign weak delegate for tracking extract progress. _reader.delegate = self;
// If achive encrypted - define password getter handler. // NOTES: // - Encrypted file needs password for extract process. // - Encrypted file with encrypted header needs password for list(iterate) and extract archive items. _reader.passwordGetter = ^NSString*(void){ return @"password to my achive"; };
when block passwordGetter iscall ,you know 7zip file is password protected
Hi,
How can I get to know a 7zip file is password protected. Right now the library is throwing a generic error