MCPcopy
hub / github.com/go-git/go-git / NewFile

Function NewFile

plumbing/object/file.go:26–28  ·  view source on GitHub ↗

NewFile returns a File based on the given blob object

(name string, m filemode.FileMode, b *Blob)

Source from the content-addressed store, hash-verified

24
25// NewFile returns a File based on the given blob object
26func NewFile(name string, m filemode.FileMode, b *Blob) *File {
27 return &File{Name: name, Mode: m, Blob: *b}
28}
29
30// Contents returns the contents of a file as a string.
31func (f *File) Contents() (content string, err error) {

Callers 3

FileMethod · 0.85
TreeEntryFileMethod · 0.85
NextMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…