#import <GITPackFile.h>
Inherited by GITPackFileVersion2, and GITPlaceholderPackFile.
Public Member Functions | |
| (NSUInteger) | - version |
| (GITPackIndex *) | - index |
| (id) | - initWithPath: |
| (NSData *) | - dataForObjectWithSha1: |
| (BOOL) | - loadObjectWithSha1:intoData:type:error: |
| (NSData *) | - checksum |
| (NSString *) | - checksumString |
| (BOOL) | - verifyChecksum |
| (NSUInteger) | - numberOfObjects |
| (BOOL) | - hasObjectWithSha1: |
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.
| - (NSData *) checksum |
Returns checksum data for the receiver
| - (NSString *) checksumString |
Returns checksum string for the receiver
| - (NSData *) dataForObjectWithSha1: | (NSString*) | sha1 |
Returns the data for the object specified by the given sha1. The sha1 will first be checked to see if it exists
| sha1 | The SHA1 of the object to retrieve the data for. |
nil if the object is not in the receiver | - (BOOL) hasObjectWithSha1: | (NSString*) | sha1 |
Indicates whether the receiver contains the object specified by the given sha1.
| sha1 | The SHA1 of the object to check the presence of |
| - (GITPackIndex *) index |
Returns the corresponding index for the receiver
For internal use only.
Subclasses must override this method
| - (id) initWithPath: | (NSString*) | path |
Creates and returns a new PACK object at the specified path.
| path | Path of the PACK file in the repository |
For internal use only.
Subclasses must override this method, failure to do so will result in an error. The overriding implementation should not call this implementation as part of itself. Instead it is recommended to use [super init] instead.
| - (BOOL) loadObjectWithSha1: | (NSString*) | sha1 | ||
| intoData: | (NSData**) | data | ||
| type: | (GITObjectType*) | type | ||
| error: | (NSError**) | error | ||
Loads and returns the contents of an object.
| sha1 | The SHA1 name of the object to load | |
| [out] | data | Data to load the object contents into |
| [out] | type | The GITObjectType of the object |
| [out] | error | NSError object containing any errors, pass NULL if you don't care |
For internal use only.
We might possibly consider the following extension to this method once Deltas are being parsed. If the type parameter has a non-zero value then this will be perceived as an expected type setting, an error should be returned if this expected type is not met.
| - (NSUInteger) numberOfObjects |
Returns the number of objects in the receiver
| - (BOOL) verifyChecksum |
Verifies if the checksum matches for the contents of the receiver.
| - (NSUInteger) version |
Returns the version of PACK file which the receiver is providing access to.
For internal use only.
Subclasses must override this method
1.5.7