ZZArchive Class Reference
| Inherits from | NSObject |
| Declared in | ZZArchive.h |
Tasks
-
URLproperty -
contentsproperty -
entriesproperty -
+ archiveWithContentsOfURL: -
+ archiveWithData: -
– initWithContentsOfURL:encoding: -
– initWithData:encoding: -
– load:
Properties
URL
The URL representing this archive.
@property (readonly, nonatomic) NSURL *URLDeclared In
ZZArchive.hcontents
The uninterpreted contents of this archive.
@property (readonly, nonatomic) NSData *contentsDeclared In
ZZArchive.hentries
The array of ZZArchiveEntry entries within this archive.
@property (readonly, nonatomic) NSArray *entriesDeclared In
ZZArchive.hClass Methods
archiveWithContentsOfURL:
Creates a new archive with the zip file at the given file URL.
+ (instancetype)archiveWithContentsOfURL:(NSURL *)URLParameters
- URL
The file URL of the zip file.
Return Value
The initialized archive. If the zip file does not exist, this will have no entries.
Discussion
The archive will use UTF-8 encoding for reading entry file names and comments.
Declared In
ZZArchive.harchiveWithData:
Creates a new archive with the raw zip file data given.
+ (instancetype)archiveWithData:(NSData *)dataParameters
- data
The raw data of the zip file
Return Value
The initialized archive.
Discussion
The archive will use UTF-8 encoding for reading entry file names and comments.
Declared In
ZZArchive.hInstance Methods
initWithContentsOfURL:encoding:
Initializes a new archive with the zip file at the given file URL.
- (id)initWithContentsOfURL:(NSURL *)URL encoding:(NSStringEncoding)encodingParameters
- URL
The file URL of the zip file.
- encoding
The encoding for reading entry file names and comments.
Return Value
The initialized archive. If the zip file does not exist, this will have no entries.
Declared In
ZZArchive.hinitWithData:encoding:
Initializes a new archive with the raw zip file data given.
- (id)initWithData:(NSData *)data encoding:(NSStringEncoding)encodingParameters
- data
The raw data of the zip file
- encoding
The encoding for reading entry file names and comments.
Return Value
The initialized archive.
Declared In
ZZArchive.hload:
- (BOOL)load:(NSError **)errorParameters
- error
The error information when an error occurs. Pass in nil if you do not want error information.
Return Value
Whether the load was successful or not.
Discussion
If you access entries or contents, the receiver already automatically loads them if needed. You only need to call this method to force a reload from source, or to check for errors when loading.
Declared In
ZZArchive.h