MCPcopy Create free account
hub / github.com/foxcpp/maddy / Create

Method Create

internal/storage/blob/fs/fs.go:70–81  ·  view source on GitHub ↗
(_ context.Context, key string, blobSize int64)

Source from the content-addressed store, hash-verified

68}
69
70func (s *FSStore) Create(_ context.Context, key string, blobSize int64) (module.Blob, error) {
71 f, err := os.Create(filepath.Join(s.root, key))
72 if err != nil {
73 return nil, err
74 }
75 if blobSize >= 0 {
76 if err := f.Truncate(blobSize); err != nil {
77 return nil, err
78 }
79 }
80 return f, nil
81}
82
83func (s *FSStore) Delete(_ context.Context, keys []string) error {
84 for _, key := range keys {

Callers

nothing calls this directly

Calls 1

CreateMethod · 0.65

Tested by

no test coverage detected