MCPcopy
hub / github.com/wavetermdev/waveterm / DeleteFile

Method DeleteFile

pkg/filestore/blockstore.go:154–163  ·  view source on GitHub ↗
(ctx context.Context, zoneId string, name string)

Source from the content-addressed store, hash-verified

152}
153
154func (s *FileStore) DeleteFile(ctx context.Context, zoneId string, name string) error {
155 return withLock(s, zoneId, name, func(entry *CacheEntry) error {
156 err := dbDeleteFile(ctx, zoneId, name)
157 if err != nil {
158 return fmt.Errorf("error deleting file: %v", err)
159 }
160 entry.clear()
161 return nil
162 })
163}
164
165func (s *FileStore) DeleteZone(ctx context.Context, zoneId string) error {
166 fileNames, err := dbGetZoneFileNames(ctx, zoneId)

Callers 4

DeleteZoneMethod · 0.95
HandleTruncateBlockFileFunction · 0.80
TestCreateFunction · 0.80
TestDeleteFunction · 0.80

Calls 3

withLockFunction · 0.85
dbDeleteFileFunction · 0.85
clearMethod · 0.80

Tested by 2

TestCreateFunction · 0.64
TestDeleteFunction · 0.64