| Declared in | GITPackCollection.h |
|---|
This class implements a proxy for unpacking objects from a collection of GITPackFile instances.
A git repository might contain a number of PACK files, each of these are independent of each other and contain different sets of data. To aid extraction of objects from the collection of PACK files this class provides a means to iterate over the collection to find objects.
The collection also keeps track of which GITPackFile it last successfully extracted an object from, this is because linked objects are likely to be stored within the same PACK file.
+ (GITPackCollection *)collectionWithContentsOfDirectory:(NSString *)directory error:(NSError **)error The path to the directory to collect the pack files from
NSError describing any errors which occurred
a collection with the pack files from the directory
Creates and returns a new collection with the pack files in the directory.
GITPackCollection.h+ (GITPackCollection *)collectionWithPackFiles:(NSArray *)files Array of GITPackFile objects
new collection
Creates and returns a new collection from the array of files.
GITPackCollection.h- (id)initWithPackFilesInDirectory:(NSString *)directory error:(NSError **)error The path to the directory to collect the pack files from
NSError describing any errors which occurred
a collection with the pack files from the directory
Creates and returns a new collection with the pack files in the directory.
GITPackCollection.h- (id)initWithPackFiles:(NSArray *)files Array of GITPackFile objects
new collection
Creates and returns a new collection from the array of files.
GITPackCollection.h- (GITPackObject *)unpackObjectWithSha1:(GITObjectHash *)objectHash error:(NSError **)error Hash identifying the object data to retrieve
NSError describing the error which occurred
pack object for the specified objectHash or nil if not found
Returns the first pack object found in the collection with the objectHash.
If this method returns nil then it means that the object could not be found in the collection, if there is an error then the error will not be nil.
GITPackCollection.hLast updated: 2011-2-20