File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed 
ObjectiveCExample/ObjectiveCExample 
SwiftExample/SwiftExample Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,14 @@ - (IBAction)unzipPressed:(id)sender {
6868 NSString  *password = _passwordField.text ;
6969 BOOL  success = [SSZipArchive unzipFileAtPath: _zipPath
7070 toDestination: unzipPath
71+  preserveAttributes: YES 
7172 overwrite: YES 
73+  nestedZipLevel: 0 
7274 password: password.length > 0  ? password : nil 
73-  error: nil ];
75+  error: nil 
76+  delegate: nil 
77+  progressHandler: nil 
78+  completionHandler: nil ];
7479 if  (success) {
7580 NSLog (@" Success unzip" 
7681 } else  {
Original file line number Diff line number Diff line change @@ -70,11 +70,17 @@ class ViewController: UIViewController {
7070 } 
7171
7272 let  password  =  passwordField. text
73-  let  success :  Void ? =  try ? SSZipArchive . unzipFile ( atPath:  zipPath, 
74-  toDestination:  unzipPath, 
75-  overwrite:  true , 
76-  password:  password? . isEmpty ==  false  ?  password :  nil ) 
77-  if  success !=  nil  { 
73+  let  success :  Bool  =  SSZipArchive . unzipFile ( atPath:  zipPath, 
74+  toDestination:  unzipPath, 
75+  preserveAttributes:  true , 
76+  overwrite:  true , 
77+  nestedZipLevel:  1 , 
78+  password:  password? . isEmpty ==  false  ?  password :  nil , 
79+  error:  nil , 
80+  delegate:  nil , 
81+  progressHandler:  nil , 
82+  completionHandler:  nil ) 
83+  if  success !=  false  { 
7884 print ( " Success unzip " ) 
7985 }  else  { 
8086 print ( " No success unzip " ) 
                         You can’t perform that action at this time. 
           
                  
0 commit comments