MCPcopy
hub / github.com/filebrowser/filebrowser / Delete

Method Delete

diskcache/file_cache.go:65–75  ·  view source on GitHub ↗
(_ context.Context, key string)

Source from the content-addressed store, hash-verified

63}
64
65func (f *FileCache) Delete(_ context.Context, key string) error {
66 mu := f.getScopedLocks(key)
67 mu.Lock()
68 defer mu.Unlock()
69
70 fileName := f.getFileName(key)
71 if err := f.fs.Remove(fileName); err != nil && !errors.Is(err, os.ErrNotExist) {
72 return err
73 }
74 return nil
75}
76
77func (f *FileCache) open(key string) (afero.File, bool, error) {
78 fileName := f.getFileName(key)

Callers

nothing calls this directly

Implementers 2

NoOpdiskcache/noop_cache.go
FileCachediskcache/file_cache.go

Calls 3

getScopedLocksMethod · 0.95
getFileNameMethod · 0.95
RemoveMethod · 0.80

Tested by

no test coverage detected