new Blob(rawRepo, rawBlob)
Blob convenience class constructor.
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
rawRepo |
git.raw.Repo | Raw repository object. | ||
rawBlob |
git.raw.Blob |
<optional> |
new git.raw.Blob(rawRepo) | Raw blob object. |
- Source:
- blob.js, line 11
Methods
-
content(callback)
-
Retrieve the blob's content.
Parameters:
Name Type Description callback
Blob~contentCallback - Source:
- blob.js, line 69
-
createFromFile(path, callback)
-
Create a new blob from the file at the given path.
Parameters:
Name Type Description path
String Full path to the file. callback
Blob~createFromFileCallback - Source:
- blob.js, line 88
-
createFromFile(buffer, callback)
-
Create a new blob from the given buffer.
Parameters:
Name Type Description buffer
Buffer Buffer used to create blob. callback
Blob~createFromBufferCallback - Source:
- blob.js, line 109
-
lookup(oid, callback)
-
Retrieve the blob represented by the oid.
Parameters:
Name Type Description oid
git.raw.Oid The OID representing the blob to lookup. callback
Blob~lookupCallback - Source:
- blob.js, line 31
-
rawContent(callback)
-
Retrieve the blob's raw content buffer.
Parameters:
Name Type Description callback
Blob~rawContentCallback - Source:
- blob.js, line 51
Type Definitions
-
contentCallback(error, content)
-
Parameters:
Name Type Description error
GitError | null An Error or null if successful. content
String | null The content of the blob or null. - Source:
- blob.js, line 70
-
createFromBufferCallback(error, content)
-
Parameters:
Name Type Description error
GitError | null An Error or null if successful. content
Blob | null The new blob or null. - Source:
- blob.js, line 110
-
createFromFileCallback(error, blob)
-
Parameters:
Name Type Description error
GitError | null An Error or null if successful. blob
Blob | null The new blob or null. - Source:
- blob.js, line 89
-
lookupCallback(error, blob)
-
Parameters:
Name Type Description error
GitError | null An Error or null if successful. blob
Blob | null Retrieved blob object or null. - Source:
- blob.js, line 32
-
rawContentCallback(error, content)
-
Parameters:
Name Type Description error
GitError | null An Error or null if successful. content
Buffer | null The raw content of the blob or null. - Source:
- blob.js, line 52