From 103b2f87723d8e3973af3e30bd5501c2d301df13 Mon Sep 17 00:00:00 2001 From: Dov Frankel Date: Tue, 9 Dec 2014 18:14:30 -0500 Subject: [PATCH] Added example usage and documentation link to Readme --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index bb0fb06..1981b69 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,24 @@ There is a main project, with unit tests, and a basic iOS example project, which I'm always open to improvements, so please submit your pull requests, or [create issues](https://github.com/abbeycode/UnrarKit/issues) for someone else to implement. +# Example Usage + +```Objective-C +URKArchive *archive = [URKArchive rarArchiveAtPath:@"An Archive.rar"]; + +NSError *error = nil; + +NSArray *filesInArchive = [archive listFiles:&error]; +BOOL extractFilesSuccessful = [archive extractFilesTo:extractURL.path + overWrite:NO + error:&error]; +NSData *extractedData = [archive extractDataFromFile:@"a file in the archive.jpg" + error:&error]; +``` + +UnrarKit is a CocoaPods project, which is the recommended way to install it. If you're not familiar with [CocoaPods](http://cocoapods.org), you can start with their [Getting Started guide](http://guides.cocoapods.org/using/getting-started.html). + + # Installation UnrarKit is a CocoaPods project, which is the recommended way to install it. If you're not familiar with [CocoaPods](http://cocoapods.org), you can start with their [Getting Started guide](http://guides.cocoapods.org/using/getting-started.html). @@ -22,6 +40,10 @@ I've included a sample [`podfile`](Example/Podfile) in the Example directory alo To open in Xcode, use the [UnrarKit.xcworkspace](UnrarKit.xcworkspace) file, which includes the other projects. +## Documentation + +Full documentation for the project is available on [CocoaDocs](http://cocoadocs.org/docsets/UnrarKit). + # Credits * Dov Frankel (dov@abbey-code.com)