MCPcopy Create free account
hub / github.com/bufbuild/buf / NewFileNode

Function NewFileNode

private/pkg/cas/file_node.go:50–55  ·  view source on GitHub ↗

NewFileNode returns a new FileNode. The path is validated to be normalized and non-empty. The digest is validated to be non-nil.

(path string, digest Digest)

Source from the content-addressed store, hash-verified

48// The path is validated to be normalized and non-empty.
49// The digest is validated to be non-nil.
50func NewFileNode(path string, digest Digest) (FileNode, error) {
51 if err := validateFileNodeParameters(path, digest); err != nil {
52 return nil, err
53 }
54 return newFileNode(path, digest), nil
55}
56
57// ParseFileNode parses the FileNode from its string representation.
58//

Callers 4

getB4DigestFunction · 0.92
BucketToDigestFunction · 0.85
NewFileSetForBucketFunction · 0.85
TestManifestFunction · 0.85

Calls 2

newFileNodeFunction · 0.85

Tested by 1

TestManifestFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…