MCPcopy
hub / github.com/kopia/kopia / Open

Method Open

internal/fusemount/fusefs.go:74–83  ·  view source on GitHub ↗
(ctx context.Context, _ uint32)

Source from the content-addressed store, hash-verified

72}
73
74func (f *fuseFileNode) Open(ctx context.Context, _ uint32) (gofusefs.FileHandle, uint32, syscall.Errno) {
75 reader, err := f.entry.(fs.File).Open(ctx) //nolint:forcetypeassert
76 if err != nil {
77 log(ctx).Errorf("error opening %v: %v", f.entry.Name(), err)
78
79 return nil, 0, syscall.EIO
80 }
81
82 return &fuseFileHandle{reader: reader, file: f.entry.(fs.File)}, 0, gofusefs.OK //nolint:forcetypeassert
83}
84
85type fuseFileHandle struct {
86 mu sync.Mutex

Callers

nothing calls this directly

Calls 3

ErrorfMethod · 0.80
OpenMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected