MCPcopy Create free account
hub / github.com/djherbis/buffer / NewFile

Function NewFile

file.go:29–34  ·  view source on GitHub ↗

NewFile returns a new BufferAt backed by "file" with max-size N.

(N int64, file File)

Source from the content-addressed store, hash-verified

27
28// NewFile returns a new BufferAt backed by "file" with max-size N.
29func NewFile(N int64, file File) BufferAt {
30 return &fileBuffer{
31 file: file,
32 Wrapper: wrapio.NewWrapper(file, 0, 0, N),
33 }
34}
35
36func init() {
37 gob.Register(&fileBuffer{})

Callers 9

GetMethod · 0.85
GetMethod · 0.85
TestWriteAtFunction · 0.85
TestFileFunction · 0.85
TestMultiFunction · 0.85
TestMulti2Function · 0.85
TestBadGobFileFunction · 0.85
TestBadGobFile2Function · 0.85
TestWrapioBreakoutFunction · 0.85

Calls 1

NewWrapperFunction · 0.92

Tested by 7

TestWriteAtFunction · 0.68
TestFileFunction · 0.68
TestMultiFunction · 0.68
TestMulti2Function · 0.68
TestBadGobFileFunction · 0.68
TestBadGobFile2Function · 0.68
TestWrapioBreakoutFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…