Merge pull request #299 from polac24/master
Define NSError as nullable argument of completionHandler
This commit is contained in:
commit
4fcec5bf76
@ -40,14 +40,14 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
+ (BOOL)unzipFileAtPath:(NSString *)path
|
+ (BOOL)unzipFileAtPath:(NSString *)path
|
||||||
toDestination:(NSString *)destination
|
toDestination:(NSString *)destination
|
||||||
progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler
|
progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler
|
||||||
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError *error))completionHandler;
|
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError * __nullable error))completionHandler;
|
||||||
|
|
||||||
+ (BOOL)unzipFileAtPath:(NSString *)path
|
+ (BOOL)unzipFileAtPath:(NSString *)path
|
||||||
toDestination:(NSString *)destination
|
toDestination:(NSString *)destination
|
||||||
overwrite:(BOOL)overwrite
|
overwrite:(BOOL)overwrite
|
||||||
password:(nullable NSString *)password
|
password:(nullable NSString *)password
|
||||||
progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler
|
progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler
|
||||||
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError *error))completionHandler;
|
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError * __nullable error))completionHandler;
|
||||||
|
|
||||||
// Zip
|
// Zip
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@
|
|||||||
overwrite:(BOOL)overwrite
|
overwrite:(BOOL)overwrite
|
||||||
password:(NSString *)password
|
password:(NSString *)password
|
||||||
progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler
|
progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler
|
||||||
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError *error))completionHandler
|
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError *__nullable error))completionHandler
|
||||||
{
|
{
|
||||||
return [self unzipFileAtPath:path toDestination:destination preserveAttributes:YES overwrite:overwrite password:password error:nil delegate:nil progressHandler:progressHandler completionHandler:completionHandler];
|
return [self unzipFileAtPath:path toDestination:destination preserveAttributes:YES overwrite:overwrite password:password error:nil delegate:nil progressHandler:progressHandler completionHandler:completionHandler];
|
||||||
}
|
}
|
||||||
@ -163,7 +163,7 @@
|
|||||||
+ (BOOL)unzipFileAtPath:(NSString *)path
|
+ (BOOL)unzipFileAtPath:(NSString *)path
|
||||||
toDestination:(NSString *)destination
|
toDestination:(NSString *)destination
|
||||||
progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler
|
progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler
|
||||||
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError *error))completionHandler
|
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError * __nullable error))completionHandler
|
||||||
{
|
{
|
||||||
return [self unzipFileAtPath:path toDestination:destination preserveAttributes:YES overwrite:YES password:nil error:nil delegate:nil progressHandler:progressHandler completionHandler:completionHandler];
|
return [self unzipFileAtPath:path toDestination:destination preserveAttributes:YES overwrite:YES password:nil error:nil delegate:nil progressHandler:progressHandler completionHandler:completionHandler];
|
||||||
}
|
}
|
||||||
@ -187,7 +187,7 @@
|
|||||||
error:(NSError **)error
|
error:(NSError **)error
|
||||||
delegate:(id<SSZipArchiveDelegate>)delegate
|
delegate:(id<SSZipArchiveDelegate>)delegate
|
||||||
progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler
|
progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler
|
||||||
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError *error))completionHandler
|
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError * __nullable error))completionHandler
|
||||||
{
|
{
|
||||||
// Begin opening
|
// Begin opening
|
||||||
zipFile zip = unzOpen((const char*)[path UTF8String]);
|
zipFile zip = unzOpen((const char*)[path UTF8String]);
|
||||||
|
Loading…
Reference in New Issue
Block a user