Challenge: .tar and .tgz Files

A listing of files in a zip file is given by zipinfo. You can get a similar listing for tar files by using the command-line tool tar:

#​ ​/​u​s​r​/​b​i​n​/​t​a​r​ ​t​f​ ​M​y​F​i​l​e​s​.​t​a​r

If the tar file is also compressed, just add a z to the flags:

#​ ​/​u​s​r​/​b​i​n​/​t​a​r​ ​t​z​f​ ​M​y​F​i​l​e​s​.​t​g​z

Extend ZIPspector to deal with .tar and .tgz files.

Get Cocoa Programming for OS X: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.