Represents a specific version of the content of a file tracked by git. Using a Blob you can access the contents of
any git object as string or byte array. For tracked files (leaves of a git tree) it returns the content of the file. For git objects
such as Commit, Tag or Tree the Blob API may be used to inspect the the uncompressed internal representation.
To open a git object instantiate a Blob with the object's Hash or another valid reference (see Ref).
var b=new Blob(repo, "e287f54");
Note, that new Blob( ...) does not create a new blob in the repository but rather constructs the object to manipulate an existing blob.
Advanced: To create a new Blob inside the repository you can use the static create function, however, you are advised to use
higher level functionality to create new revisions of files, i.e. by using the Commit.Create API (see Commit).
Path to the file that should be stored in the blob
Public properties
stringData get;
Get the uncompressed contents of this Blob as string. This assumes that the contents are encoded in UTF8.
stringHash get;
boolIsBlob get;
boolIsCommit get;
boolIsTag get;
boolIsTree get;
Byte[]RawData get;
Get the uncompressed original encoded raw data of the Blob as byte array. This is useful if the contents of the blob are encoded in some legacy encoding instead of UTF8.