Skip to content

Commit

Permalink
Updated changelog and readme for issue #89
Browse files Browse the repository at this point in the history
  • Loading branch information
abbeycode committed Feb 13, 2020
1 parent fe723eb commit 51eede8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Fixed behavior of `-extractFilesTo:overwrite:error:`, so it shows the progress of each individual file as they extract (Issue #91, PR #94)
* Deprecated the initializers that take a file path instead of an `NSURL` (Issue #90, PR #95)
* Fixed a crasher for unreadable files in `+pathIsAZip:` (Issue #99)
* Deprecated all overloads of `-writeData:...` and `-writeIntoBuffer:...` that take any file properties other than the path, replacing them each with a single call that takes an instance of the new `ZipFileProperties`. This allows for all the default values to be defined in one place, so you can specify only where you want to deviate from the defaults (Issue #89, PR #97)

## 1.9

Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,30 @@ You can also modify Zip archives:
filePath:@"dir/filename.jpg"
error:&error];
```
* Write an in-memory `NSData` into the archive with custom properties

**Objective-C**

```Objective-C
ZipFileProperties *props = [[ZipFileProperties alloc] init:someFile];
props.password = @"secret";

BOOL success = [archive writeData:someFile
filePath:@"dir/filename.jpg"
error:&error];
```

**Swift**

```Swift
do {
let props = ZipFileProperties(filePath)
props.password = "secret"
try archive.write(someFile, props: props)
} catch let error as NSError {
NSLog("Error writing to file \(filePath): \(error)")
}
```
* Write data as a stream to the archive (from disk or over the network), using a block:

```Objective-C
Expand Down

0 comments on commit 51eede8

Please sign in to comment.