Latest 0.3.0
Homepage https://github.com/mhausherr/Light-Untar-for-iOS
License BSD
Platforms ios 5.0, requires ARC
Authors

Light Untar for iOS

Purpose

Why this code?

http://blog.octo.com/en/untar-on-ios-the-pragmatic-way/

What this code will do:

  • Extract files and directories created with the tar -cf command
  • Work with 512 block or multiple (tar -b512 or just tar)

What this code will not do:

  • Extract compressed files and directories created with the tar -czf command
  • Work with unix right and ownership
  • Work with no standard block size

How to use

NSData* tarData = [NSData dataWithContentsOfFile:@"/path/to/your/tar/file.tar"];
NSError *error;
[[NSFileManager defaultManager] createFilesAndDirectoriesAtPath:@"/path/to/your/extracted/files/" withTarData:tarData error:&error];

Remember that you can’t write outside your app directory

Latest podspec

{
    "name": "Light-Untar",
    "version": "0.3.0",
    "summary": "Extract files and directories created with the tar -cf command.",
    "homepage": "https://github.com/mhausherr/Light-Untar-for-iOS",
    "license": "BSD",
    "authors": {
        "Mathieu Hausherr": "[email protected]"
    },
    "source": {
        "git": "https://github.com/mhausherr/Light-Untar-for-iOS.git",
        "tag": "0.3.0"
    },
    "platforms": {
        "ios": "5.0"
    },
    "source_files": "Light-Untar/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This