Git.framework Reference Library

GITPackFile Class Reference

GITPackFile Class Reference

Declared in GITPackFile.h

Overview

GITPackFile is a class which provides access to individual PACK files within a git repository.

A PACK file is an archive format used by git primarily for network transmission of repository objects. Once transmitted the received PACK files are then used for access to the stored objects.

Tasks

Class Methods

packWithPath:error:

+ (id)packWithPath:(NSString *)packPath error:(NSError **)error
Parameters
packPath

Path to the PACK file

error

NSError describing the error that occurred

Return Value

PACK File object or nil if an error occurred

Discussion

Create an autoreleased PACK file with the specified path.

See Also
Declared In
GITPackFile.h

Instance Methods

initWithPath:error:

- (id)initWithPath:(NSString *)packPath error:(NSError **)error
Parameters
packPath

Path to the PACK file

error

NSError describing the error that occurred

Return Value

PACK File object or nil if an error occurred

Discussion

Initialises a PACK file with the specified path.

See Also
Declared In
GITPackFile.h

initWithData:indexPath:error:

- (id)initWithData:(NSData *)packData indexPath:(NSString *)indexPath error:(NSError **)error
Parameters
packData

NSData object of the PACK file data

indexPath

Path to the PACK files Index file

error

NSError describing the error that occurred

Return Value

PACK file object or nil if an error occurred

Discussion

Initialises a PACK file with the specified data and path to index file.

Declared In
GITPackFile.h

version

- (NSUInteger)version
Return Value

Integer version of the PACK file

Discussion

Returns the PACK file version.

Declared In
GITPackFile.h

index

- (GITPackIndex *)index
Return Value

index of the receiver

Discussion

Returns the index of the receiver

Declared In
GITPackFile.h

numberOfObjects

- (NSUInteger)numberOfObjects
Return Value

number of objects in the receiver

Discussion

Returns the number of objects stored in the receiver

Declared In
GITPackFile.h

unpackObjectWithSha1:error:

- (GITPackObject *)unpackObjectWithSha1:(GITObjectHash *)objectHash error:(NSError **)error
Parameters
objectHash

Hash identifying the object data to retrieve

error

NSError describing the error which occurred

Return Value

pack object for the specified objectHash or nil if an error occurred

Discussion

Returns a pack object identified by objectHash.

The pack object consists of the data required to create a proper git object.

Declared In
GITPackFile.h

Last updated: 2011-2-20