diff --git a/LICENSE b/LICENSE index 5cb1a7e..1348f0f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2010 Tasteful Works, Inc. +Copyright (c) 2010 Sam Soffes Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/Readme.markdown b/Readme.markdown index 93fe2cf..3f3ae9b 100644 --- a/Readme.markdown +++ b/Readme.markdown @@ -1,16 +1,16 @@ -# TWZipArchive +# SSZipArchive -TWZipArchive is a simple utility class for unzipping files based on [ZipArchive](http://code.google.com/p/ziparchive). +SSZipArchive is a simple utility class for unzipping files based on [ZipArchive](http://code.google.com/p/ziparchive). Currently it only supports unzipping. In the future, creating zip files will be supported. ## Adding to your project -1. Add `TWZipArchive.h`, `TWZipArchive.m`, and `minizip` to your project. +1. Add `SSZipArchive.h`, `SSZipArchive.m`, and `minizip` to your project. 2. Add the `libz` library to your target ## Usage NSString *path = @"path_to_your_zip_file"; NSString *destination = @"path_to_the_folder_where_you_want_it_unzipped"; - [TWZipArchive unzipFileAtPath:path toDestination:destination]; + [SSZipArchive unzipFileAtPath:path toDestination:destination]; diff --git a/TWZipArchive.h b/TWZipArchive.h index afa7ad1..9e0e5d5 100644 --- a/TWZipArchive.h +++ b/TWZipArchive.h @@ -1,15 +1,15 @@ // -// TWZipArchive.h -// TWZipArchive +// SSZipArchive.h +// SSZipArchive // // Created by Sam Soffes on 7/21/10. -// Copyright Tasteful Works 2010. All rights reserved. +// Copyright Sam Soffes 2010. All rights reserved. // // Based on ZipArchive by aish // http://code.google.com/p/ziparchive // -@interface TWZipArchive : NSObject { +@interface SSZipArchive : NSObject { } diff --git a/TWZipArchive.m b/TWZipArchive.m index a7d7886..48d5d9d 100644 --- a/TWZipArchive.m +++ b/TWZipArchive.m @@ -1,23 +1,23 @@ // -// TWZipArchive.mm -// TWZipArchive +// SSZipArchive.m +// SSZipArchive // // Created by Sam Soffes on 7/21/10. -// Copyright Tasteful Works 2010. All rights reserved. +// Copyright Sam Soffes 2010. All rights reserved. // -#import "TWZipArchive.h" +#import "SSZipArchive.h" #include "minizip/zip.h" #include "minizip/unzip.h" #import "zlib.h" #import "zconf.h" -@interface TWZipArchive (PrivateMethods) +@interface SSZipArchive (PrivateMethods) + (NSDate *)_dateFor1980; @end -@implementation TWZipArchive +@implementation SSZipArchive + (BOOL)unzipFileAtPath:(NSString *)path toDestination:(NSString *)destination { return [self unzipFileAtPath:path toDestination:destination overwrite:YES password:nil error:nil]; @@ -29,7 +29,7 @@ if (zip == NULL) { NSDictionary *userInfo = [NSDictionary dictionaryWithObject:@"failed to open zip file" forKey:NSLocalizedDescriptionKey]; if (error) { - *error = [NSError errorWithDomain:@"TWZipArchiveErrorDomain" code:-1 userInfo:userInfo]; + *error = [NSError errorWithDomain:@"SSZipArchiveErrorDomain" code:-1 userInfo:userInfo]; } return NO; } @@ -41,7 +41,7 @@ if (unzGoToFirstFile(zip) != UNZ_OK) { NSDictionary *userInfo = [NSDictionary dictionaryWithObject:@"failed to open first file in zip file" forKey:NSLocalizedDescriptionKey]; if (error) { - *error = [NSError errorWithDomain:@"TWZipArchiveErrorDomain" code:-2 userInfo:userInfo]; + *error = [NSError errorWithDomain:@"SSZipArchiveErrorDomain" code:-2 userInfo:userInfo]; } return NO; }