MCPcopy
hub / github.com/rclone/rclone / getCacheFs

Method getCacheFs

backend/cache/cache_internal_test.go:1306–1318  ·  view source on GitHub ↗
(f fs.Fs)

Source from the content-addressed store, hash-verified

1304}
1305
1306func (r *run) getCacheFs(f fs.Fs) (*cache.Fs, error) {
1307 cfs, ok := f.(*cache.Fs)
1308 if ok {
1309 return cfs, nil
1310 }
1311 if f.Features().UnWrap != nil {
1312 cfs, ok := f.Features().UnWrap().(*cache.Fs)
1313 if ok {
1314 return cfs, nil
1315 }
1316 }
1317 return nil, errors.New("didn't found a cache fs")
1318}
1319
1320func randStringBytes(n int) []byte {
1321 b := make([]byte, n)

Calls 2

FeaturesMethod · 0.65
UnWrapMethod · 0.65

Tested by

no test coverage detected