MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / NewFile

Function NewFile

message/elements.go:318–320  ·  view source on GitHub ↗
(data []byte, fileName string)

Source from the content-addressed store, hash-verified

316}
317
318func NewFile(data []byte, fileName string) *FileElement {
319 return NewStreamFile(bytes.NewReader(data), fileName)
320}
321
322func NewStreamFile(r io.ReadSeeker, fileName string) *FileElement {
323 md5, sha1, length := crypto.ComputeMd5AndSha1AndLength(r)

Callers

nothing calls this directly

Calls 1

NewStreamFileFunction · 0.85

Tested by

no test coverage detected