MCPcopy Index your code
hub / github.com/foxcpp/maddy / FileBuffer

Struct FileBuffer

framework/buffer/file.go:31–38  ·  view source on GitHub ↗

FileBuffer implements Buffer interface using file system.

Source from the content-addressed store, hash-verified

29
30// FileBuffer implements Buffer interface using file system.
31type FileBuffer struct {
32 Path string
33
34 // LenHint is the size of the stored blob. It can
35 // be set to avoid the need to call os.Stat in the
36 // Len() method.
37 LenHint int
38}
39
40func (fb FileBuffer) Open() (io.ReadCloser, error) {
41 return os.Open(fb.Path)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected